[Bug 1328958] Re: Local provider assumes a local "ubuntu" user exists
** Changed in: juju-core Status: New => Triaged ** Changed in: juju-core Importance: Undecided => Medium ** Tags added: local-provider ** Summary changed: - Local provider assumes a local "ubuntu" user exists + Local provider run on cloud images want ubuntu user -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to juju-core in Ubuntu. https://bugs.launchpad.net/bugs/1328958 Title: Local provider run on cloud images want ubuntu user To manage notifications about this bug go to: https://bugs.launchpad.net/juju-core/+bug/1328958/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1328958] Re: Local provider assumes a local "ubuntu" user exists
I have reproduced the issue again on a fresh Trusty cloud image. It reproduces reliably just by removing the ubuntu user first. Exact reproduction steps below. > Juju requires the machines it provisions to have an ubuntu user. That's fine, but Juju must not assume that the local user has an ubuntu user to start with, when bootstrap a local provider environment. Juju is expected to run on an Ubuntu desktop machine. Ubuntu desktop machines do not typically have an ubuntu user. So, to test this common case in an easily reproducible environment, I start by removing the ubuntu user, to bring a cloud image environment closer to that of a desktop user environment. I first came across this bug on my laptop, which has never been a cloud environment and has never had an ubuntu user. Apparently Juju has the "ubuntu" user hardcoded somewhere in a code path that runs locally, which is a false assumption. Exact steps to reproduce on a Trusty cloud image: ubuntu@foo:~$ cat /etc/cloud/build.info build_name: server serial: 20140607.1 sudo -i apt-get update && sudo apt-get -y dist-upgrade reboot sudo -i adduser --disabled-password --gecos foo foo cp -a ~ubuntu/.ssh ~foo/ chown -R foo. ~foo/.ssh echo 'foo ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/foo logout # Log back in as foo here sudo deluser ubuntu sudo add-apt-repository -y ppa:juju/stable sudo apt-get update sudo apt-get -y install juju-core juju-local apt-cache policy juju-core juju-local juju-core: Installed: 1.18.4-0ubuntu1~14.04.1~juju1 Candidate: 1.18.4-0ubuntu1~14.04.1~juju1 Version table: *** 1.18.4-0ubuntu1~14.04.1~juju1 0 500 http://ppa.launchpad.net/juju/stable/ubuntu/ trusty/main amd64 Packages 100 /var/lib/dpkg/status 1.18.1-0ubuntu1 0 500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages juju-local: Installed: 1.18.4-0ubuntu1~14.04.1~juju1 Candidate: 1.18.4-0ubuntu1~14.04.1~juju1 Version table: *** 1.18.4-0ubuntu1~14.04.1~juju1 0 500 http://ppa.launchpad.net/juju/stable/ubuntu/ trusty/main amd64 Packages 100 /var/lib/dpkg/status 1.18.1-0ubuntu1 0 500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages foo@foo:~$ getent passwd ubuntu foo@foo:~$ getent passwd foo foo:x:1001:1001:foo,,,:/home/foo:/bin/bash foo@foo:~$ echo $USER foo juju generate-config juju switch local juju bootstrap --series trusty --upload-tools Actual results: uploading tools for series [trusty] Logging to /home/foo/.juju/local/cloud-init-output.log on remote host chown: invalid user: ‘ubuntu:ubuntu’ Bootstrap failed, destroying environment ERROR exit status 1 Expected results: successful local environment bootstrap. ** Changed in: juju-core Status: Incomplete => New -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to juju-core in Ubuntu. https://bugs.launchpad.net/bugs/1328958 Title: Local provider assumes a local "ubuntu" user exists To manage notifications about this bug go to: https://bugs.launchpad.net/juju-core/+bug/1328958/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1328958] Re: Local provider assumes a local "ubuntu" user exists
The Juju CI tests do two non obvious things to test the local provider. 1. Never su to the testing account. Always log directly in. 2. Always export USER=jenkins so that juju knows which user owns the containers. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to juju-core in Ubuntu. https://bugs.launchpad.net/bugs/1328958 Title: Local provider assumes a local "ubuntu" user exists To manage notifications about this bug go to: https://bugs.launchpad.net/juju-core/+bug/1328958/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1328958] Re: Local provider assumes a local "ubuntu" user exists
I do not this issue. None of our own machines have an ubuntu user and juju works. Juju requires the machines it provisions to have an ubuntu user. Juju uses the login user as the identity for the local db and containers. The user account that is doing the deploy must export USER=, this is the default behaviour in ubuntu, but extraordinary user/sh configuration will skip this step, then juju doesn't know who owns the container. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to juju-core in Ubuntu. https://bugs.launchpad.net/bugs/1328958 Title: Local provider assumes a local "ubuntu" user exists To manage notifications about this bug go to: https://bugs.launchpad.net/juju-core/+bug/1328958/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1328958] Re: Local provider assumes a local "ubuntu" user exists
** Changed in: juju-core Status: New => Incomplete -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to juju-core in Ubuntu. https://bugs.launchpad.net/bugs/1328958 Title: Local provider assumes a local "ubuntu" user exists To manage notifications about this bug go to: https://bugs.launchpad.net/juju-core/+bug/1328958/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1328958] Re: Local provider assumes a local "ubuntu" user exists
Filed bug 1332820 for test coverage. -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to juju-core in Ubuntu. https://bugs.launchpad.net/bugs/1328958 Title: Local provider assumes a local "ubuntu" user exists To manage notifications about this bug go to: https://bugs.launchpad.net/juju-core/+bug/1328958/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs
[Bug 1328958] Re: Local provider assumes a local "ubuntu" user exists
My steps to reproduce on a Trusty cloud image (off the top of my head - let me know if you have any problems): 1. sudo adduser --disabled-password --gecos '' otheruser 2. echo 'otheruser ALL=(ALL) NOPASSWD:ALL'|sudo tee --append /etc/sudoers 3. sudo add-apt-repository ppa:juju/stable 4. sudo apt-get install -y juju-core juju-local 5. Log in as otheruser (arrange authorized_keys first, etc). 6. sudo deluser ubuntu 7. juju generate-config 8. juju switch local 9. juju bootstrap --upload-tools --series trusty uploading tools for series [trusty] Logging to /home/otheruser/.juju/local/cloud-init-output.log on remote host chown: invalid user: ‘ubuntu:ubuntu’ Bootstrap failed, destroying environment ERROR exit status 1 -- You received this bug notification because you are a member of Ubuntu Server Team, which is subscribed to juju-core in Ubuntu. https://bugs.launchpad.net/bugs/1328958 Title: Local provider assumes a local "ubuntu" user exists To manage notifications about this bug go to: https://bugs.launchpad.net/juju-core/+bug/1328958/+subscriptions -- Ubuntu-server-bugs mailing list Ubuntu-server-bugs@lists.ubuntu.com Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs