Juju cant add ssh-keys when user ubuntu home is relocated
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Triaged
|
Low
|
Unassigned |
Bug Description
As part of a charm, we move the user "ubuntu" home to /lhome to make way for autofs to mount user NFS home directories.
As a result, juju throws errors:
machine-1: 10:19:10 DEBUG juju.utils.ssh reading authorised keys file /home/ubuntu/
machine-1: 10:19:10 DEBUG juju.utils.ssh reading authorised keys file /home/ubuntu/
machine-1: 10:19:10 INFO juju.worker.
machine-1: 10:19:10 DEBUG juju.worker.
machine-1: 10:19:10 ERROR juju.worker.
machine-1: 10:19:10 DEBUG juju.worker.
mkdir /home/ubuntu: permission denied
/workspace/
/workspace/
This is problematic and hightlight the need to have juju not depend on the user ubuntu and having its home placed in /home/ubuntu.
I'm not sure what we have broken at this point with our charm, but its fundamentally needed for us to be able to mount NFS homes for user in an enterprise context.
Changed in juju: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in juju: | |
status: | Triaged → New |
importance: | High → Undecided |
Changed in juju: | |
milestone: | 2.9-beta1 → 2.9-rc1 |
tags: | added: community-feedback |
It sounds like the home dir is hard coded in Juju.
The request here is relatively straightforward: charms should reference the HOME env variable rather than looking directly for /home/ubuntu/.ssh.
There are probably a few traps here. I believe the rabbitmq uses HOME for things other than "the user's home directory," for example, and we want to make sure not to break that. But overall, a charm author should be able to do special things with the home dir without breaking ssh keys.