yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #58433
[Bug 1635350] Re: unit tests fail as non-root on maas deployed system
** Changed in: cloud-init (Ubuntu)
Status: New => Fix Released
** Changed in: cloud-init (Ubuntu)
Importance: Undecided => Medium
** Also affects: cloud-init (Ubuntu Yakkety)
Importance: Undecided
Status: New
** Also affects: cloud-init (Ubuntu Xenial)
Importance: Undecided
Status: New
** Changed in: cloud-init (Ubuntu Xenial)
Status: New => Confirmed
** Changed in: cloud-init (Ubuntu Yakkety)
Status: New => Confirmed
** Changed in: cloud-init (Ubuntu Xenial)
Importance: Undecided => Low
** Changed in: cloud-init (Ubuntu Yakkety)
Importance: Undecided => Low
** Description changed:
+ === Begin SRU Template ===
+ [Impact]
+ Running cloud-init's unit test cases on a system deployed by MAAS would
+ fail. The reason is that the non-root user would not be able to read
+ files with MAAS node credentials in /etc/cloud/cloud.cfg.d
+
+ [Test Case]
+ Run unit tests on a system deployed by maas, or even just with:
+ f=/etc/cloud/cloud.cfg.d/90_dpkg_maas.cfg
+ sh -c 'mkdir -p "${1%/*}" && touch "$1" && chmod ugo-r "$1"' -- "$f"
+ tox -e py3
+
+ [Regression Potential]
+ This was just to fix a build break or unit tests being run.
+ Changes are only to unit tests.
+ === End SRU Template ===
+
+
Observed Behavior:
On a system deployed by MAAS I checked out master and then tried to immediately build it:
> git clone https://git.launchpad.net/cloud-init
> cd cloud-init
> ./packages/bddeb
I get a number of errors around permission issues around this file:
PermissionError: [Errno 13] Permission denied: \'/etc/cloud/cloud.cfg.d/90_dpkg_maas.cfg\'
See: https://paste.ubuntu.com/23354559/
- or formatted better: http://paste.ubuntu.com/23374383/
+ or formatted better: http://paste.ubuntu.com/23374383/
If I run as root however, it build as expected.
Expected Behavior:
Running bddeb works as a non-root user.
** Description changed:
=== Begin SRU Template ===
- [Impact]
+ [Impact]
Running cloud-init's unit test cases on a system deployed by MAAS would
- fail. The reason is that the non-root user would not be able to read
- files with MAAS node credentials in /etc/cloud/cloud.cfg.d
-
+ fail. The reason is that the non-root user would not be able to read
+ files with MAAS node credentials in /etc/cloud/cloud.cfg.d
+
+ We want this change SRU so that an attempt to build and run tests on a
+ system deployed by maas will work rather than fail due to unit test failure.
+
[Test Case]
Run unit tests on a system deployed by maas, or even just with:
- f=/etc/cloud/cloud.cfg.d/90_dpkg_maas.cfg
- sh -c 'mkdir -p "${1%/*}" && touch "$1" && chmod ugo-r "$1"' -- "$f"
- tox -e py3
-
- [Regression Potential]
+ f=/etc/cloud/cloud.cfg.d/90_dpkg_maas.cfg
+ sh -c 'mkdir -p "${1%/*}" && touch "$1" && chmod ugo-r "$1"' -- "$f"
+ tox -e py3
+
+ [Regression Potential]
This was just to fix a build break or unit tests being run.
Changes are only to unit tests.
=== End SRU Template ===
-
Observed Behavior:
On a system deployed by MAAS I checked out master and then tried to immediately build it:
> git clone https://git.launchpad.net/cloud-init
> cd cloud-init
> ./packages/bddeb
I get a number of errors around permission issues around this file:
PermissionError: [Errno 13] Permission denied: \'/etc/cloud/cloud.cfg.d/90_dpkg_maas.cfg\'
See: https://paste.ubuntu.com/23354559/
or formatted better: http://paste.ubuntu.com/23374383/
If I run as root however, it build as expected.
Expected Behavior:
Running bddeb works as a non-root user.
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1635350
Title:
unit tests fail as non-root on maas deployed system
Status in cloud-init:
Fix Committed
Status in cloud-init package in Ubuntu:
Fix Released
Status in cloud-init source package in Xenial:
Confirmed
Status in cloud-init source package in Yakkety:
Confirmed
Bug description:
=== Begin SRU Template ===
[Impact]
Running cloud-init's unit test cases on a system deployed by MAAS would
fail. The reason is that the non-root user would not be able to read
files with MAAS node credentials in /etc/cloud/cloud.cfg.d
We want this change SRU so that an attempt to build and run tests on a
system deployed by maas will work rather than fail due to unit test failure.
[Test Case]
Run unit tests on a system deployed by maas, or even just with:
f=/etc/cloud/cloud.cfg.d/90_dpkg_maas.cfg
sh -c 'mkdir -p "${1%/*}" && touch "$1" && chmod ugo-r "$1"' -- "$f"
tox -e py3
[Regression Potential]
This was just to fix a build break or unit tests being run.
Changes are only to unit tests.
=== End SRU Template ===
Observed Behavior:
On a system deployed by MAAS I checked out master and then tried to immediately build it:
> git clone https://git.launchpad.net/cloud-init
> cd cloud-init
> ./packages/bddeb
I get a number of errors around permission issues around this file:
PermissionError: [Errno 13] Permission denied: \'/etc/cloud/cloud.cfg.d/90_dpkg_maas.cfg\'
See: https://paste.ubuntu.com/23354559/
or formatted better: http://paste.ubuntu.com/23374383/
If I run as root however, it build as expected.
Expected Behavior:
Running bddeb works as a non-root user.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1635350/+subscriptions
References