unittests blkid command fails on slave s390x

Bug #1636531 reported by Joshua Powers
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Medium
Unassigned
cloud-init (Ubuntu)
Fix Released
Medium
Unassigned
Xenial
Fix Released
Medium
Unassigned
Yakkety
Fix Released
Medium
Unassigned
Zesty
Fix Released
Medium
Unassigned
Artful
Fix Released
Medium
Unassigned

Bug Description

=== Begin SRU Template ===
[Impact]
 Unit test updates to avoid leaking blkid calls from tests/unittests/test_datasource/test_altcloud.py.

[Test Case]

wget https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/plain/bin/lxc-proposed-snapshot

chmod 755 lxc-proposed-snapshot

# Create fake-blkid.sh
cat fake-blkid.sh
#!/bin/bash
echo "LEAKED BLKID CALL"

name=proposed-test
for release in xenial yakkety zesty; do \
 ref=$release-proposed;
 ./lxc-proposed-snapshot --proposed --publish $release $ref;
 lxc init $ref $name;
 lxc start $name;
 sleep 10;
 lxc exec $name -- mv /sbin/blkid /sbin/blkid.orig;
 chmod 755 fake-blkid.sh;
 lxc file push fake-blkid.sh $name/sbin/blkid;
 lxc exec $name -- git clone -b ubuntu/xenial https://git.launchpad.net/cloud-init;
 lxc exec $name -- sudo apt install tox -y;
 tox -e py27 tests/unittests/test_datasource/test_altcloud.py | grep 'LEAKED BLKID';
done

[Regression Potential]
None. Unit test changes only

[Other Info]

=== End SRU Template ===

Running the unittests on our slave s390x system, the blkid command fails. Running it manually returns the following:

jenkins@s1lp04:~$ blkid -tLABEL=CDROM -odevice
jenkins@s1lp04:~$ echo $?
2
jenkins@s1lp04:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
dasda 94:0 0 20.6G 0 disk
|-dasda1 94:1 0 19.7G 0 part /
`-dasda2 94:2 0 953.5M 0 part [SWAP]

Full run output:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/nodes=s390x/53/console

Related branches

Revision history for this message
Joshua Powers (powersj) wrote :

Fixed by modifying the jenkins env. path to include /home/jenkins/bin:/home/jenkins/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/sbin:/sbin:/bin:/snap/bin

Changed in cloud-init:
status: New → Invalid
Chad Smith (chad.smith)
description: updated
Scott Moser (smoser)
Changed in cloud-init (Ubuntu Artful):
status: New → Fix Released
Changed in cloud-init (Ubuntu Xenial):
status: New → Confirmed
Changed in cloud-init (Ubuntu Yakkety):
status: New → Confirmed
Changed in cloud-init (Ubuntu Zesty):
status: New → Confirmed
Changed in cloud-init (Ubuntu Xenial):
importance: Undecided → Medium
Changed in cloud-init (Ubuntu Yakkety):
importance: Undecided → Medium
Changed in cloud-init (Ubuntu Zesty):
importance: Undecided → Medium
Changed in cloud-init (Ubuntu Artful):
importance: Undecided → Medium
Scott Moser (smoser)
Changed in cloud-init:
status: Invalid → Fix Committed
importance: Undecided → Medium
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Joshua, or anyone else affected,

Accepted cloud-init into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.9-113-g513e99e0-0ubuntu1~16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cloud-init (Ubuntu Xenial):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello Joshua, or anyone else affected,

Accepted cloud-init into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.9-113-g513e99e0-0ubuntu1~16.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cloud-init (Ubuntu Yakkety):
status: Confirmed → Fix Committed
Revision history for this message
Steve Langasek (vorlon) wrote :

Hello Joshua, or anyone else affected,

Accepted cloud-init into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.9-113-g513e99e0-0ubuntu1~17.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in cloud-init (Ubuntu Zesty):
status: Confirmed → Fix Committed
Chad Smith (chad.smith)
description: updated
description: updated
description: updated
Revision history for this message
Chad Smith (chad.smith) wrote :

Validated no /sbin/blkid leaks from altcloud unit tests in xenial:

$ name=test-proposed
$ release=xenial
$ ref=$release-proposed
$ ./lxc-proposed-snapshot --proposed --publish $release $ref
$ lxc init $ref $name
Creating test-proposed
$ lxc exec $name -- git clone -b ubuntu/xenial https://git.launchpad.net/cloud-init;
...
$ lxc exec $name bash
root@test-proposed:~/cloud-init# tox -e py27 tests/unittests/test_datasource/test_altcloud.py | grep 'LEAKED BLKID'
# None reported
root@test-proposed:~/cloud-init# /sbin/blkid
LEAKED BLKID CALL
$ lxc exec $name -- dpkg -l cloud-init
ii cloud-init 0.7.9-113-g5 all Init scripts for cloud instances

tags: added: verification-done-xenial
Revision history for this message
Chad Smith (chad.smith) wrote :

Verified yakkety and zesty:
$ for release in yakkety zesty; do ref=$release-proposed; lxc init $ref $name; lxc start $name; sleep 10; lxc exec $name -- git clone -b ubuntu/xenial https://git.launchpad.net/cloud-init; lxc exec $name -- apt install python2.7 tox -y; lxc exec $name -- mv /sbin/blkid /sbin/blkid.orig; lxc file push fake-blkid.sh $name/sbin/blkid; lxc exec $name bash; lxc exec $name -- dpkg -l cloud-init; lxc exec $name -- grep VERSION= /etc/os-release; lxc stop $name; lxc delete $name; done

reating proposed-test
Cloning into 'cloud-init'...
remote: Counting objects: 25632, done.
remote: Compressing objects: 100% (10479/10479), done.
remote: Total 25632 (delta 18547), reused 21070 (delta 14881)
Receiving objects: 100% (25632/25632), 16.85 MiB | 2.43 MiB/s, done.
Resolving deltas: 100% (18547/18547), done.
Checking connectivity... done.
Get:1 http://archive.ubuntu.com/ubuntu yakkety/main amd64 libpython2.7-minimal amd64 2.7.12-3build1 [340 kB]
...
Setting up python2.7 (2.7.12-3build1) ...
root@proposed-test:~# cd cloud-init/
root@proposed-test:~/cloud-init# tox -e py27 tests/unittests/test_datasource/test_altcloud.py | grep 'LEAKED BLKID'
## no LEAKED calls reported. Checking that blkid was properly hijacked
root@proposed-test:~/cloud-init# /sbin/blkid
LEAKED BLKID CALL
root@proposed-test:~/cloud-init# exit
exit
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii cloud-init 0.7.9-113-g5 all Init scripts for cloud instances
VERSION="16.10 (Yakkety Yak)"
Creating proposed-test
Creating proposed-test
Cloning into 'cloud-init'...
remote: Counting objects: 25632, done.
remote: Compressing objects: 100% (10479/10479), done.
remote: Total 25632 (delta 18543), reused 21074 (delta 14881)
Receiving objects: 100% (25632/25632), 16.85 MiB | 7.67 MiB/s, done.
Resolving deltas: 100% (18543/18543), done.
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  javascript-common libjs-jquery libjs-sphinxdoc libjs-underscore
... Setting up python2.7 (2.7.13-2) ...
tox -e py27 tests/unittests/test_datasource/test_altcloud.py | grep 'LEAKED BLKID'
## no LEAKED calls reported. Checking that blkid was properly hijacked
root@proposed-test:~/cloud-init# /sbin/blkid
LEAKED BLKID CALL
root@proposed-test:~/cloud-init# exit
exit
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii cloud-init 0.7.9-113-g5 all Init scripts for cloud instances
VERSION="17.04 (Zesty Zapus)"

tags: added: verification-done-yakkety verification-done-zesty
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.7.9-113-g513e99e0-0ubuntu1~16.04.1

---------------
cloud-init (0.7.9-113-g513e99e0-0ubuntu1~16.04.1) xenial-proposed; urgency=medium

  * debian/update-grub-legacy-ec2: fix early exit failure no /etc/fstab
    file. (LP: #1682160)
  * New upstream snapshot.
    - nova-lxd: read product_name from environment, not platform.
      (LP: #1685810)
    - Fix yum repo config where keys contain array values [Dylan Perry]
    - template: Update debian backports template [Joshua Powers]
    - rsyslog: replace ~ with stop [Joshua Powers] (LP: #1367899)
    - Doc: add additional RTD examples [Joshua Powers]
    - Fix growpart for some cases when booted with root=PARTUUID.
      (LP: #1684869)
    - pylint: update output style to parseable [Joshua Powers]
    - pylint: fix all logging warnings [Joshua Powers]
    - CloudStack: Add NetworkManager to list of supported DHCP lease dirs.
      [Syed Mushtaq Ahmed]
    - net: kernel lies about vlans not stealing mac addresses, when they do
      [Dimitri John Ledkov] (LP: #1682871)
    - ds-identify: Check correct path for "latest" config drive
      [Daniel Watkins] (LP: #1673637)
    - doc: Fix example for resolv.conf configuration. [Jon Grimm]
    - Fix examples that reference upstream chef repository. [Jon Grimm]
    - doc: correct grammar and improve clarity in merging documentation.
      [David Tagatac]
    - doc: Add missing doc link to snap-config module. [Ryan Harper]
    - snap: allows for creating cloud-init snap [Joshua Powers]
    - DigitalOcean: assign IPv4ll address to lowest indexed interface.
      [Ben Howard] (LP: #1676908)
    - DigitalOcean: configure all NICs presented in meta-data.
      [Ben Howard] (LP: #1676908)
    - Remove (and/or fix) URL shortener references [Jon Grimm]
    - HACKING.rst: more info on filling out contributors agreement.
    - util: teach write_file about copy_mode option
      [Lars Kellogg-Stedman] (LP: #1644064)
    - DigitalOcean: bind resolvers to loopback interface.
      [Ben Howard] (LP: #1676908)
    - tests: fix AltCloud tests to not rely on blkid (LP: #1636531)

 -- Scott Moser <email address hidden> Thu, 27 Apr 2017 12:51:04 -0400

Changed in cloud-init (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Chris Halse Rogers (raof) wrote : Update Released

The verification of the Stable Release Update for cloud-init has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.7.9-113-g513e99e0-0ubuntu1~16.10.1

---------------
cloud-init (0.7.9-113-g513e99e0-0ubuntu1~16.10.1) yakkety; urgency=medium

  * debian/update-grub-legacy-ec2: fix early exit failure no /etc/fstab
    file. (LP: #1682160)
  * New upstream snapshot.
    - nova-lxd: read product_name from environment, not platform.
      (LP: #1685810)
    - Fix yum repo config where keys contain array values [Dylan Perry]
    - template: Update debian backports template [Joshua Powers]
    - rsyslog: replace ~ with stop [Joshua Powers] (LP: #1367899)
    - Doc: add additional RTD examples [Joshua Powers]
    - Fix growpart for some cases when booted with root=PARTUUID.
      (LP: #1684869)
    - pylint: update output style to parseable [Joshua Powers]
    - pylint: fix all logging warnings [Joshua Powers]
    - CloudStack: Add NetworkManager to list of supported DHCP lease dirs.
      [Syed Mushtaq Ahmed]
    - net: kernel lies about vlans not stealing mac addresses, when they do
      [Dimitri John Ledkov] (LP: #1682871)
    - ds-identify: Check correct path for "latest" config drive
      [Daniel Watkins] (LP: #1673637)
    - doc: Fix example for resolv.conf configuration. [Jon Grimm]
    - Fix examples that reference upstream chef repository. [Jon Grimm]
    - doc: correct grammar and improve clarity in merging documentation.
      [David Tagatac]
    - doc: Add missing doc link to snap-config module. [Ryan Harper]
    - snap: allows for creating cloud-init snap [Joshua Powers]
    - DigitalOcean: assign IPv4ll address to lowest indexed interface.
      [Ben Howard] (LP: #1676908)
    - DigitalOcean: configure all NICs presented in meta-data.
      [Ben Howard] (LP: #1676908)
    - Remove (and/or fix) URL shortener references [Jon Grimm]
    - HACKING.rst: more info on filling out contributors agreement.
    - util: teach write_file about copy_mode option
      [Lars Kellogg-Stedman] (LP: #1644064)
    - DigitalOcean: bind resolvers to loopback interface.
      [Ben Howard] (LP: #1676908)
    - tests: fix AltCloud tests to not rely on blkid (LP: #1636531)

 -- Scott Moser <email address hidden> Thu, 27 Apr 2017 13:38:40 -0400

Changed in cloud-init (Ubuntu Yakkety):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cloud-init - 0.7.9-113-g513e99e0-0ubuntu1~17.04.1

---------------
cloud-init (0.7.9-113-g513e99e0-0ubuntu1~17.04.1) zesty; urgency=medium

  * debian/update-grub-legacy-ec2: fix early exit failure no /etc/fstab
    file. (LP: #1682160)
  * New upstream snapshot.
    - nova-lxd: read product_name from environment, not platform.
      (LP: #1685810)
    - Fix yum repo config where keys contain array values [Dylan Perry]
    - template: Update debian backports template [Joshua Powers]
    - rsyslog: replace ~ with stop [Joshua Powers] (LP: #1367899)
    - Doc: add additional RTD examples [Joshua Powers]
    - Fix growpart for some cases when booted with root=PARTUUID.
      (LP: #1684869)
    - pylint: update output style to parseable [Joshua Powers]
    - pylint: fix all logging warnings [Joshua Powers]
    - CloudStack: Add NetworkManager to list of supported DHCP lease dirs.
      [Syed Mushtaq Ahmed]
    - net: kernel lies about vlans not stealing mac addresses, when they do
      [Dimitri John Ledkov] (LP: #1682871)
    - ds-identify: Check correct path for "latest" config drive
      [Daniel Watkins] (LP: #1673637)
    - doc: Fix example for resolv.conf configuration. [Jon Grimm]
    - Fix examples that reference upstream chef repository. [Jon Grimm]
    - doc: correct grammar and improve clarity in merging documentation.
      [David Tagatac]
    - doc: Add missing doc link to snap-config module. [Ryan Harper]
    - snap: allows for creating cloud-init snap [Joshua Powers]
    - DigitalOcean: assign IPv4ll address to lowest indexed interface.
      [Ben Howard] (LP: #1676908)
    - DigitalOcean: configure all NICs presented in meta-data.
      [Ben Howard] (LP: #1676908)
    - Remove (and/or fix) URL shortener references [Jon Grimm]
    - HACKING.rst: more info on filling out contributors agreement.
    - util: teach write_file about copy_mode option
      [Lars Kellogg-Stedman] (LP: #1644064)
    - DigitalOcean: bind resolvers to loopback interface.
      [Ben Howard] (LP: #1676908)
    - tests: fix AltCloud tests to not rely on blkid (LP: #1636531)

 -- Scott Moser <email address hidden> Thu, 27 Apr 2017 15:09:31 -0400

Changed in cloud-init (Ubuntu Zesty):
status: Fix Committed → Fix Released
Revision history for this message
Scott Moser (smoser) wrote : Fixed in Cloud-init 17.1

This bug is believed to be fixed in cloud-init in 17.1. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.