ssh-setup/nova needs to support novaclient.v2 API for xenial

Bug #1552730 reported by Federico Gimenez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
autopkgtest (Ubuntu)
Fix Released
Medium
Martin Pitt
Xenial
Fix Released
Medium
Martin Pitt

Bug Description

Hi, I'm getting this error [1] using the nova ssh-setup option on a xenial up-to-date box, please let me know if you need any further information.

$ lsb_release -rd
Description: Ubuntu Xenial Xerus (development branch)
Release: 16.04

$ apt-cache policy autopkgtest
autopkgtest:
  Installed: 3.19.3
  Candidate: 3.19.3
  Version table:
 *** 3.19.3 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status

$ apt-cache policy python-novaclient
python-novaclient:
  Installed: 2:3.2.0-2ubuntu1
  Candidate: 2:3.2.0-2ubuntu1
  Version table:
 *** 2:3.2.0-2ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status

Thanks!

[1] http://paste.ubuntu.com/15273685/

Revision history for this message
Martin Pitt (pitti) wrote :

adt-virt-ssh: DBG: execute-timeout: /usr/share/autopkgtest/ssh-setup/nova open -d --flavor autopkgtest --image ubuntu/ubuntu-xenial-daily-amd64-server-* --keyname jenkins-github-snapcraft-autopkgtest-cloud-97 --net-id=net_ues-snappy-integration --security-groups ssh -e http_proxy=http://squid.internal:3128 -e https_proxy=http://squid.internal:3128 -e no_proxy=127.0.0.1,127.0.1.1,localhost,localdomain,novalocal,internal,archive.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,ppa.launchpad.net -l ubuntu
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named v1_1

This seems to be an error in your nova installation. What does "nova list" show?

Changed in autopkgtest (Ubuntu):
status: New → Opinion
status: Opinion → Incomplete
Revision history for this message
Martin Pitt (pitti) wrote :

--image 'ubuntu/ubuntu-xenial-daily-amd64-server-*'

BTW, while this happens to work, it is not quite what you want. This is a regular expression, and you don't want to match on "zero or more dashes". --image 'ubuntu/ubuntu-xenial-daily-amd64-server' is quite enough, though :)

Revision history for this message
Federico Gimenez (fgimenez) wrote :

Hi Martin thanks for your response.

This the "nova list" output:

jenkins-slave@d44710aa9fcb:~$ nova list
+--------------------------------------+------------+--------+------------+-------------+----------------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+------------+--------+------------+-------------+----------------------------------------+
| f283d3bd-5be5-4a78-a6be-ac9f1c3a8656 | test-11857 | ACTIVE | - | Running | net_ues-snappy-integration=10.42.58.49 |
| eece8318-421d-458a-a9d2-3c8ede8ec4ed | test-13214 | ACTIVE | - | Running | net_ues-snappy-integration=10.42.58.27 |
| 65400be3-0e6c-4773-a17a-bb2e8e89253a | test-15788 | ACTIVE | - | Running | net_ues-snappy-integration=10.42.58.69 |
| 6f2b7b00-4d0b-4128-b987-1df85f5aaf9d | test-17895 | ACTIVE | - | Running | net_ues-snappy-integration=10.42.58.70 |
+--------------------------------------+------------+--------+------------+-------------+----------------------------------------+
jenkins-slave@d44710aa9fcb:~$ nova --version
3.2.0

And thanks for the --image hint! :)

Revision history for this message
Federico Gimenez (fgimenez) wrote :

In previous successful executions I was getting a deprecation warning:

adt-virt-ssh: DBG: execute-timeout: /usr/share/autopkgtest/ssh-setup/nova open -d --flavor autopkgtest --image ubuntu/ubuntu-xenial-daily-amd64-server-* --keyname jenkins-github-snapcraft-autopkgtest-cloud-89 --net-id=net_ues-snappy-integration --security-groups ssh -e http_proxy=http://squid.internal:3128 -e https_proxy=http://squid.internal:3128 -e no_proxy=127.0.0.1,127.0.1.1,localhost,localdomain,novalocal,internal,archive.ubuntu.com,security.ubuntu.com,ddebs.ubuntu.com,ppa.launchpad.net -l ubuntu
/usr/lib/python2.7/dist-packages/novaclient/v1_1/__init__.py:30: UserWarning: Module novaclient.v1_1 is deprecated (taken as a basis for novaclient.v2). The preferable way to get client class or object you can find in novaclient.client module.
  warnings.warn("Module novaclient.v1_1 is deprecated (taken as a basis for "
/usr/lib/python2.7/dist-packages/novaclient/v2/client.py:109: UserWarning: 'novaclient.v2.client.Client' is not designed to be initialized directly. It is inner class of novaclient. Please, use 'novaclient.client.Client' instead. Related lp bug-report: 1493576
  _LW("'novaclient.v2.client.Client' is not designed to be "
Creating nova instance adt-nova-8QGajB from image ubuntu/ubuntu-xenial-daily-amd64-server-20160227-disk1.img (UUID f708a0ed-d368-48c9-bc48-c85fe20c592e)...

Revision history for this message
Martin Pitt (pitti) wrote :

Indeed it seems that python-novaclient in xenial lost the v1_1 submodule. So it seems ssh-setup/nova needs to be adjusted to get along with either.

Sorry, this is only running on trusty in practice, so I didn't notice that yet.

Changed in autopkgtest (Ubuntu):
assignee: nobody → Martin Pitt (pitti)
importance: Undecided → Medium
status: Incomplete → Triaged
summary: - error using nova ssh-setup
+ ssh-setup/nova needs to support novaclient.v2 API for xenial
Changed in autopkgtest (Ubuntu Xenial):
milestone: none → ubuntu-16.03
Revision history for this message
Martin Pitt (pitti) wrote :
Changed in autopkgtest (Ubuntu Xenial):
milestone: ubuntu-16.03 → none
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autopkgtest - 3.20.1

---------------
autopkgtest (3.20.1) unstable; urgency=medium

  * When testing click packages, don't regenerate all AppArmor profiles if
    /var/cache/apparmor/click-ap.rules already exists. That way the profiles
    can be pre-adjusted once in a testbed instead of once for each test run,
    which greatly speeds up iterations. (LP: #1553797)
  * Move SshRunner* tests from lxc to lxd.
  * NullRunner.test_tree_output_dir test: Only check for cpu_{model,flags} on
    x86 and ARM, as these need parsing adjustments on other architectures.
  * Disable lxd autopkgtest for now, this still needs some way to set a proxy.
  * lib/VirtSubproc.py, cmd_reboot(): Add workaround for dhclient hanging on
    reboot (see LP #1556175).
  * Fix regular expression for removing profile guarded dependencies on hosts
    that don't support build profiles.
  * adt-virt-lxc: Suppress lxc-copy's stdout in the "no btrfs" fallback case.
    (Closes: #818185)

 -- Martin Pitt <email address hidden> Mon, 14 Mar 2016 22:35:54 +0100

Changed in autopkgtest (Ubuntu Xenial):
status: Fix Committed → Fix Released
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.