Page MenuHomePhabricator

deployment-bastion: Cannot create /home/l10nupdate/.ssh; parent directory /home/l10nupdate does not exist
Closed, ResolvedPublic

Description

Switching off of NFS on beta cluster causes puppet on deployment-bastion to fail with:

Error: Cannot create /home/l10nupdate/.ssh; parent directory /home/l10nupdate does not exist
Error: /Stage[main]/Scap::L10nupdate/File[/home/l10nupdate/.ssh]/ensure: change from absent to directory failed: Cannot create /home/l10nupdate/.ssh; parent directory /home/l10nupdate does not exist

The user is defined in LDAP:

$ getent passwd l10nupdate
l10nupdate:x:10002:10002:l10nupdate:/home/l10nupdate:/bin/bash

$ grep l10nupdate /etc/passwd
$

$ ldaplist -l passwd l10nupdate
dn: uid=l10nupdate,ou=people,dc=wikimedia,dc=org
        uid: l10nupdate
        objectClass: person
        objectClass: organizationalPerson
        objectClass: inetorgperson
        objectClass: ldappublickey
        objectClass: shadowaccount
        objectClass: posixaccount
        objectClass: top
        loginShell: /bin/bash
        uidNumber: 10002
        gidNumber: 10002
        sn: l10nupdate
        homeDirectory: /home/l10nupdate
        cn: l10nupdate
$

The user is defined in puppet modules/mediawiki/manifests/users.pp

user { 'l10nupdate':
     ensure     => present,
     gid        => 10002,
     shell      => '/bin/bash',
     home       => '/home/l10nupdate',
     managehome => true,
 }

Seems the manage home is not executed because puppet find the user via LDAP.

Event Timeline

hashar raised the priority of this task from to High.
hashar updated the task description. (Show Details)
hashar added subscribers: Bugreporter, zhuyifei1999, Krenair and 3 others.
hashar claimed this task.

On deployment-bastion I created the dir:

# mkdir /home/l10nupdate
# chown l10nupdate:l10nupdate /home/l10nupdate
# ls -ld /home/l10nupdate
drwxr-xr-x 3 l10nupdate l10nupdate 4096 Jun 22 10:03 /home/l10nupdate
#

Which matches tin.eqiad.wmnet.

Puppet is unlocked:

Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_config_dir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/physicalcorecount.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/ec2id.rb
Info: Loading facts in /var/lib/puppet/lib/facter/lldp.rb
Info: Loading facts in /var/lib/puppet/lib/facter/initsystem.rb
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/ganeti.rb
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Loading facts in /var/lib/puppet/lib/facter/apt.rb
Info: Caching catalog for deployment-bastion.deployment-prep.eqiad.wmflabs
Info: Applying configuration version '1434967234'
Notice: /Stage[main]/Role::Labs::Instance/Exec[/usr/local/sbin/manage-keys-nfs]/returns: executed successfully
Notice: /Stage[main]/Base::Puppet/Service[puppet]/ensure: ensure changed 'running' to 'stopped'
Notice: /Stage[main]/Role::Labs::Lvm::Mnt/Labs_lvm::Volume[second-local-disk]/Labs_lvm::Extend[/mnt]/Exec[extend-vd-/mnt]/returns: executed successfully
Notice: /Stage[main]/Deployment::Deployment_server/Salt::Grain[deployment_server]/Exec[ensure_deployment_server_true]/returns: executed successfully
Info: Salt::Grain[deployment_server]: Scheduling refresh of Exec[deployment_server_sync_all]
Notice: /Stage[main]/Deployment::Deployment_server/Exec[deployment_server_sync_all]: Triggered 'refresh' from 1 events
Notice: /Stage[main]/Deployment::Deployment_server/Exec[eventual_consistency_deployment_server_init]/returns: executed successfully
Notice: /Stage[main]/Scap::L10nupdate/File[/home/l10nupdate/.ssh/id_rsa]/ensure: defined content as '{md5}b038e3cffdd2fe878ad4dc9596591aff'
Notice: /Stage[main]/Scap::L10nupdate/File[/home/l10nupdate/.ssh/id_rsa.pub]/ensure: defined content as '{md5}c42f6aea12480e9b73fe22c0632bd34a'
Notice: Finished catalog run in 80.84 seconds