[SRU] Files missing from package

Bug #1634475 reported by Liam Young
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Fix Released
Undecided
Corey Bryant
Mitaka
Fix Released
Undecided
Corey Bryant
Newton
Fix Released
Undecided
Corey Bryant
mistral (Ubuntu)
Fix Released
Undecided
Corey Bryant
Xenial
Fix Released
Undecided
Corey Bryant
Yakkety
Fix Released
Undecided
Corey Bryant

Bug Description

[Description]
After the package is installed some of the files that support the initialisation of the database seem to missing. As does the policy.json.

The files that are missing:

/usr/lib/python2.7/dist-packages/mistral/actions/openstack/mapping.json
/usr/lib/python2.7/dist-packages/mistral/resources (directory + contents)
/etc/mistral/policy.json

Without the DB files the schema initialisation fails:
# mistral-db-manage --config-file /etc/mistral/mistral.conf populate
Traceback (most recent call last):
  File "/usr/bin/mistral-db-manage", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/dist-packages/mistral/db/sqlalchemy/migration/cli.py", line 129, in main
    CONF.command.func(config, CONF.command.name)
  File "/usr/lib/python2.7/dist-packages/mistral/db/sqlalchemy/migration/cli.py", line 70, in do_populate
    action_manager.sync_db()
  File "/usr/lib/python2.7/dist-packages/mistral/services/action_manager.py", line 82, in sync_db
    register_action_classes()
  File "/usr/lib/python2.7/dist-packages/mistral/services/action_manager.py", line 128, in register_action_classes
    _register_dynamic_action_classes()
  File "/usr/lib/python2.7/dist-packages/mistral/services/action_manager.py", line 88, in _register_dynamic_action_classes
    actions = generator.create_actions()
  File "/usr/lib/python2.7/dist-packages/mistral/actions/openstack/action_generator/base.py", line 77, in create_actions
    mapping = get_mapping()
  File "/usr/lib/python2.7/dist-packages/mistral/actions/openstack/action_generator/base.py", line 45, in get_mapping
    MAPPING_PATH)).read())
IOError: [Errno 2] No such file or directory: '/usr/lib/python2.7/dist-packages/mistral/actions/openstack/mapping.json'

And without the policy.json clients cannot authorise.

[Test Case]
Reproduce db issue:
lxc launch ubuntu-daily:yakkety
lxc exec <container-name> bash
apt update
apt install mistral-api
mistral-db-manage --config-file /etc/mistral/mistral.conf populate

[Regression Potential]
Very little as the fix just updates the package to install the missing json files.

Changed in cloud-archive:
status: New → In Progress
Changed in mistral (Ubuntu):
status: New → In Progress
Changed in mistral (Ubuntu Xenial):
status: New → In Progress
Changed in cloud-archive:
assignee: nobody → Corey Bryant (corey.bryant)
Changed in mistral (Ubuntu Xenial):
assignee: nobody → Corey Bryant (corey.bryant)
summary: - Files missing from package
+ [SRU] Files missing from package
Changed in mistral (Ubuntu):
assignee: nobody → Corey Bryant (corey.bryant)
description: updated
description: updated
Changed in mistral (Ubuntu Yakkety):
assignee: nobody → Corey Bryant (corey.bryant)
status: New → In Progress
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Package updates have been uploaded to zesty, yakkety, and xenial review queues. Note: policy.json did not exist in mistral 2.0.0 (xenial).

Also contributed patch back to Debian: https://review.openstack.org/#/c/388083/

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

This bug was fixed in the package mistral - 3.0.0-1ubuntu1

---------------
mistral (3.0.0-1ubuntu1) zesty; urgency=medium

  * d/rules, d/mistral-common.postinst.in, d/mistral-common.postrm:
    Install missing json files (LP: #1634475).

 -- Corey Bryant <email address hidden> Tue, 18 Oct 2016 09:14:30 -0400

Changed in mistral (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Hello Liam, or anyone else affected,

Accepted mistral into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mistral/3.0.0-1ubuntu0.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 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 mistral (Ubuntu Yakkety):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Liam, or anyone else affected,

Accepted mistral into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mistral/2.0.0-1ubuntu1 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 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 mistral (Ubuntu Xenial):
status: In Progress → Fix Committed
Revision history for this message
Ryan Beisner (1chb1n) wrote :

Hello Liam, or anyone else affected,

Accepted mistral into mitaka-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:mitaka-proposed
  sudo apt-get update

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-mitaka-needed to verification-mitaka-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-mitaka-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!

tags: added: verification-mitaka-needed
tags: added: verification-done verification-mitaka-done
removed: verification-mitaka-needed verification-needed
Revision history for this message
Corey Bryant (corey.bryant) wrote :

This package still needs some fixes. /usr/lib/python2.7/dist-packages/mistral/resources/actions is missing:

WARNING:mistral.actions.openstack.action_generator.base:Failed to create action: magnum.mservices_get 'MServiceManager' object has no attribute 'get'
Traceback (most recent call last):
  File "/usr/bin/mistral-db-manage", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/dist-packages/mistral/db/sqlalchemy/migration/cli.py", line 129, in main
    CONF.command.func(config, CONF.command.name)
  File "/usr/lib/python2.7/dist-packages/mistral/db/sqlalchemy/migration/cli.py", line 70, in do_populate
    action_manager.sync_db()
  File "/usr/lib/python2.7/dist-packages/mistral/services/action_manager.py", line 83, in sync_db
    register_standard_actions()
  File "/usr/lib/python2.7/dist-packages/mistral/services/action_manager.py", line 41, in register_standard_actions
    action_paths = utils.get_file_list(ACTIONS_PATH)
  File "/usr/lib/python2.7/dist-packages/mistral/utils/__init__.py", line 176, in get_file_list
    return [path.join(base_path, f) for f in os.listdir(base_path)
OSError: [Errno 2] No such file or directory: '/usr/lib/python2.7/dist-packages/mistral/resources/actions'

tags: added: verification-failed verification-mitaka-failed
removed: verification-done verification-mitaka-done
Revision history for this message
Corey Bryant (corey.bryant) wrote :

I've synced/uploaded new versions of the mistral package to zesty, yakkety, and xenial with the missing bits to install the files to /usr/lib/python2.7/dist-packages/mistral/resources/*.

Ryan Beisner (1chb1n)
Changed in cloud-archive:
status: In Progress → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Liam, or anyone else affected,

Accepted mistral into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mistral/3.0.0-2ubuntu0.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 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!

tags: removed: verification-failed
tags: added: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Liam, or anyone else affected,

Accepted mistral into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/mistral/2.0.0-1ubuntu2 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 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!

Revision history for this message
James Page (james-page) wrote :

Hello Liam, or anyone else affected,

Accepted mistral into mitaka-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:mitaka-proposed
  sudo apt-get update

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-mitaka-needed to verification-mitaka-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-mitaka-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!

tags: added: verification-mitaka-needed
removed: verification-mitaka-failed
Revision history for this message
James Page (james-page) wrote :

Hello Liam, or anyone else affected,

Accepted mistral into newton-proposed. The package will build now and be available in the Ubuntu Cloud Archive in a few hours, and then in the -proposed repository.

Please help us by testing this new package. To enable the -proposed repository:

  sudo add-apt-repository cloud-archive:newton-proposed
  sudo apt-get update

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-newton-needed to verification-newton-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-newton-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!

tags: added: verification-newton-needed
Revision history for this message
James Page (james-page) wrote :

This bug was fixed in the package mistral - 3.0.0-2~cloud0
---------------

 mistral (3.0.0-2~cloud0) xenial-ocata; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 mistral (3.0.0-2) unstable; urgency=medium
 .
   [ Corey Bryant ]
   * d/rules, d/mistral-common.postinst.in, d/mistral-common.postrm:
     Install missing json files (LP: #1634475).
   * d/control: Add python-pep8 to Build-Depends.
 .
   [ Thomas Goirand ]
   * Fixed lsb-base depends.
 .
   [ Gauvain Pocentek ]
   * d/rules: install missing resources directory, needed when populating the
     mistral DB

Changed in cloud-archive:
status: Fix Committed → Fix Released
Revision history for this message
James Page (james-page) wrote : Update Released

The verification of the Stable Release Update for mistral has completed successfully and the package has now been released to -updates. 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
James Page (james-page) wrote :

This bug was fixed in the package mistral - 3.0.0-2ubuntu0.16.10.1~cloud0
---------------

 mistral (3.0.0-2ubuntu0.16.10.1~cloud0) xenial-newton; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 mistral (3.0.0-2ubuntu0.16.10.1) yakkety; urgency=medium
 .
   [ Corey Bryant ]
   * d/rules, d/mistral-common.postinst.in, d/mistral-common.postrm:
     Install missing json files (LP: #1634475).
   * d/control: Add python-pep8 to Build-Depends.
 .
   [ Thomas Goirand ]
   * Fixed lsb-base depends.
 .
   [ Gauvain Pocentek ]
   * d/rules: install missing resources directory, needed when populating the
     mistral DB

Revision history for this message
Chuck Short (zulcss) wrote :

I was able to create a database no problem.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Robie Basak (racb) wrote :

@Chuck,

Which releases did you test? Can you confirm that this was without UCA, and confirm what the package version was of mistral for each test? And did you follow the Test Case documented above, or something else?

tags: added: verification-needed
removed: verification-done
Revision history for this message
James Page (james-page) wrote :

@Robie

I'm picking up verification of this bug.

Revision history for this message
James Page (james-page) wrote :

# apt-cache policy mistral-api
mistral-api:
  Installed: 3.0.0-2ubuntu0.16.10.1
  Candidate: 3.0.0-2ubuntu0.16.10.1
  Version table:
 *** 3.0.0-2ubuntu0.16.10.1 500
        500 http://archive.ubuntu.com/ubuntu yakkety-proposed/universe amd64 Packages
        100 /var/lib/dpkg/status
     3.0.0-1 500
        500 http://archive.ubuntu.com/ubuntu yakkety/universe amd64 Packages

Confirmed that 'upgrade head' and 'populate' targets for mistral-db-manage work OK, but I did have to use a MySQL database as sqlite appears to not be supported.

tags: added: verification-done-yakkety
Revision history for this message
James Page (james-page) wrote :

Extra steps for verification:

export DEBIAN_FRONTEND=noninteractive

apt install -y mysql-server crudini

mysql -u root << EOF
CREATE DATABASE mistral;
GRANT ALL PRIVILEGES ON mistral.* TO 'mistral'@'localhost' \
  IDENTIFIED BY 'changeme';
GRANT ALL PRIVILEGES ON mistral.* TO 'mistral'@'%' \
  IDENTIFIED BY 'changeme';
EOF

crudini --set /etc/mistral/mistral.conf database connection "mysql://mistral:changeme@localhost/mistral"

mistral-db-manage --config-file /etc/mistral/mistral.conf upgrade head
mistral-db-manage --config-file /etc/mistral/mistral.conf populate

Revision history for this message
James Page (james-page) wrote :

# apt-cache policy mistral-api
mistral-api:
  Installed: 2.0.0-1ubuntu2
  Candidate: 2.0.0-1ubuntu2
  Version table:
 *** 2.0.0-1ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu xenial-proposed/universe amd64 Packages
        100 /var/lib/dpkg/status
     2.0.0-1 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

Confirmed that 'upgrade head' and 'populate' targets for mistral-db-manage work OK, but I did have to use a MySQL database as sqlite appears to not be supported.

tags: added: verification-done
removed: verification-done-yakkety verification-needed
Revision history for this message
James Page (james-page) wrote :

xenial-newton

# apt-cache policy mistral-api
mistral-api:
  Installed: 3.0.0-2ubuntu0.16.10.1~cloud0
  Candidate: 3.0.0-2ubuntu0.16.10.1~cloud0
  Version table:
 *** 3.0.0-2ubuntu0.16.10.1~cloud0 500
        500 http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-proposed/newton/main amd64 Packages
        100 /var/lib/dpkg/status
     2.0.0-1 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

Confirmed that 'upgrade head' and 'populate' targets for mistral-db-manage work OK, but I did have to use a MySQL database as sqlite appears to not be supported.

tags: added: verification-newton-done
removed: verification-newton-needed
Revision history for this message
James Page (james-page) wrote :

trusty-mitaka

# apt-cache policy mistral-api
mistral-api:
  Installed: 2.0.0-1ubuntu2~cloud0
  Candidate: 2.0.0-1ubuntu2~cloud0
  Version table:
 *** 2.0.0-1ubuntu2~cloud0 0
        500 http://ubuntu-cloud.archive.canonical.com/ubuntu/ trusty-proposed/mitaka/main amd64 Packages
        100 /var/lib/dpkg/status

Confirmed that 'upgrade head' and 'populate' targets for mistral-db-manage work OK, but I did have to use a MySQL database as sqlite appears to not be supported.

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

This bug was fixed in the package mistral - 2.0.0-1ubuntu2

---------------
mistral (2.0.0-1ubuntu2) xenial; urgency=medium

  [ Gauvain Pocentek ]
  * d/rules: install missing resources directory, needed when populating the
    mistral DB (LP: #1634475).

 -- Corey Bryant <email address hidden> Tue, 01 Nov 2016 12:07:32 -0400

Changed in mistral (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mistral - 3.0.0-2ubuntu0.16.10.1

---------------
mistral (3.0.0-2ubuntu0.16.10.1) yakkety; urgency=medium

  [ Corey Bryant ]
  * d/rules, d/mistral-common.postinst.in, d/mistral-common.postrm:
    Install missing json files (LP: #1634475).
  * d/control: Add python-pep8 to Build-Depends.

  [ Thomas Goirand ]
  * Fixed lsb-base depends.

  [ Gauvain Pocentek ]
  * d/rules: install missing resources directory, needed when populating the
    mistral DB

 -- Thomas Goirand <email address hidden> Wed, 19 Oct 2016 11:05:37 +0200

Changed in mistral (Ubuntu Yakkety):
status: Fix Committed → Fix Released
Revision history for this message
James Page (james-page) wrote :

The verification of the Stable Release Update for mistral has completed successfully and the package has now been released to -updates. 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
James Page (james-page) wrote :

This bug was fixed in the package mistral - 2.0.0-1ubuntu2~cloud0
---------------

 mistral (2.0.0-1ubuntu2~cloud0) trusty-mitaka; urgency=medium
 .
   * New update for the Ubuntu Cloud Archive.
 .
 mistral (2.0.0-1ubuntu2) xenial; urgency=medium
 .
   [ Gauvain Pocentek ]
   * d/rules: install missing resources directory, needed when populating the
     mistral DB (LP: #1634475).

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.