mantic heat package missing heat/cloudinit/ files

Bug #2039302 reported by Corey Bryant
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu Cloud Archive
Triaged
High
Unassigned
Bobcat
Triaged
High
Unassigned
heat (Ubuntu)
Fix Released
High
Unassigned
Mantic
Triaged
High
Unassigned

Bug Description

[Impact]

Creating a stack on mantic results in (see /var/log/heat/heat-engine.log):

2023-10-13 17:14:44.705 78879 INFO heat.engine.resource [None req-3809003f-f9b6-42ae-85f5-e41e859c622b admin - - - - -] CREATE: Server "my_instance" Stack "stack3" [467ab1c9-523f-4fff-a774-be66b96572ea]
2023-10-13 17:14:44.705 78879 ERROR heat.engine.resource Traceback (most recent call last):
2023-10-13 17:14:44.705 78879 ERROR heat.engine.resource File "/usr/lib/python3/dist-packages/heat/engine/resource.py", line 922, in _action_recorder
2023-10-13 17:14:44.705 78879 ERROR heat.engine.resource yield
2023-10-13 17:14:44.705 78879 ERROR heat.engine.resource File "/usr/lib/python3/dist-packages/heat/engine/resource.py", line 1034, in _do_action
2023-10-13 17:14:44.705 78879 ERROR heat.engine.resource yield from self.action_handler_task(action, args=handler_args)
2023-10-13 17:14:44.705 78879 ERROR heat.engine.resource File "/usr/lib/python3/dist-packages/heat/engine/resource.py", line 976, in action_handler_task
2023-10-13 17:14:44.705 78879 ERROR heat.engine.resource handler_data = handler(*args)
2023-10-13 17:14:44.705 78879 ERROR heat.engine.resource ^^^^^^^^^^^^^^
2023-10-13 17:14:44.705 78879 ERROR heat.engine.resource File "/usr/lib/python3/dist-packages/heat/engine/resources/openstack/nova/server.py", line 848, in handle_create
2023-10-13 17:14:44.705 78879 ERROR heat.engine.resource userdata = self.client_plugin().build_userdata(
2023-10-13 17:14:44.705 78879 ERROR heat.engine.resource ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-10-13 17:14:44.705 78879 ERROR heat.engine.resource File "/usr/lib/python3/dist-packages/heat/engine/clients/os/nova.py", line 370, in build_userdata
2023-10-13 17:14:44.705 78879 ERROR heat.engine.resource read_cloudinit_file('config')).safe_substitute(
2023-10-13 17:14:44.705 78879 ERROR heat.engine.resource ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-10-13 17:14:44.705 78879 ERROR heat.engine.resource File "/usr/lib/python3/dist-packages/heat/engine/clients/os/nova.py", line 352, in read_cloudinit_file
2023-10-13 17:14:44.705 78879 ERROR heat.engine.resource return pkgutil.get_data(
2023-10-13 17:14:44.705 78879 ERROR heat.engine.resource ^^^^^^^^^^^^^^^^^
2023-10-13 17:14:44.705 78879 ERROR heat.engine.resource File "/usr/lib/python3.11/pkgutil.py", line 640, in get_data
2023-10-13 17:14:44.705 78879 ERROR heat.engine.resource return loader.get_data(resource_name)
2023-10-13 17:14:44.705 78879 ERROR heat.engine.resource ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-10-13 17:14:44.705 78879 ERROR heat.engine.resource File "<frozen importlib._bootstrap_external>", line 1130, in get_data
2023-10-13 17:14:44.705 78879 ERROR heat.engine.resource FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3/dist-packages/heat/cloudinit/config'

2023-10-13 17:28:34.236 571625 INFO heat.engine.resource [None req-d4e72a94-b94d-4927-8796-c5919afac221 admin - - - - -] CREATE: Server "my_instance" Stack "stack4" [1f196864-0d28-4338-94ec-6310736a3256]
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource Traceback (most recent call last):
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource File "/usr/lib/python3/dist-packages/heat/engine/resource.py", line 922, in _action_recorder
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource yield
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource File "/usr/lib/python3/dist-packages/heat/engine/resource.py", line 1034, in _do_action
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource yield from self.action_handler_task(action, args=handler_args)
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource File "/usr/lib/python3/dist-packages/heat/engine/resource.py", line 976, in action_handler_task
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource handler_data = handler(*args)
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource ^^^^^^^^^^^^^^
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource File "/usr/lib/python3/dist-packages/heat/engine/resources/openstack/nova/server.py", line 848, in handle_create
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource userdata = self.client_plugin().build_userdata(
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource File "/usr/lib/python3/dist-packages/heat/engine/clients/os/nova.py", line 373, in build_userdata
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource read_cloudinit_file('boothook.sh')).safe_substitute(
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource File "/usr/lib/python3/dist-packages/heat/engine/clients/os/nova.py", line 352, in read_cloudinit_file
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource return pkgutil.get_data(
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource ^^^^^^^^^^^^^^^^^
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource File "/usr/lib/python3.11/pkgutil.py", line 640, in get_data
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource return loader.get_data(resource_name)
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource File "<frozen importlib._bootstrap_external>", line 1130, in get_data
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3/dist-packages/heat/cloudinit/boothook.sh'
2023-10-13 17:28:34.236 571625 ERROR heat.engine.resource
2023-10-13 17:28:34.263 571625 INFO heat.engine.stack [None req-d4e72a94-b94d-4927-8796-c5919afac221 admin - - - - -] Stack CREATE FAILED (stack4): Resource CREATE failed: FileNotFoundError: resources.my_instance: [Errno 2] No such file or directory: '/usr/lib/python3/dist-packages/heat/cloudinit/boothook.sh'

[Test Case]
Deploy OpenStack with juju and create a heat stack. It should be successful.

[Regression Potential]
The heat package doesn't include the missing files in the cloudinit directory. Adding the files to the package install should not cause any issues. Currently creation of a heat stack won't work on mantic. It does, however, currently work when the same package is backported to jammy (bobcat cloud archive).

Changed in heat (Ubuntu Mantic):
status: New → Triaged
importance: Undecided → High
description: updated
description: updated
Revision history for this message
Corey Bryant (corey.bryant) wrote :

If needed before this SRU lands, the fix is available in https://launchpad.net/~corey.bryant/+archive/ubuntu/mantic-bobcat

summary: - No such file or directory: '/usr/lib/python3/dist-
- packages/heat/cloudinit/config'
+ mantic heat package missing heat/cloudinit/ files
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Ubuntu package update uploaded to noble and mantic unapproved queue.

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

This bug was fixed in the package heat - 1:21.0.0-0ubuntu3

---------------
heat (1:21.0.0-0ubuntu3) noble; urgency=medium

  * d/p/install-missing-files.patch: Install missing database and cloudinit
    files (LP: #2039302).
  * d/gbp.conf, .launchpad.yaml: Sync from cloud-archive-tools for
    caracal.

 -- Corey Bryant <email address hidden> Fri, 13 Oct 2023 13:33:37 -0400

Changed in heat (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Corey, or anyone else affected,

Accepted heat into mantic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/heat/1:21.0.0-0ubuntu2.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, what testing has been performed on the package and change the tag from verification-needed-mantic to verification-done-mantic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-mantic. In either case, without details of your testing we will not be able to proceed.

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

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in heat (Ubuntu Mantic):
status: Triaged → Fix Committed
tags: added: verification-needed verification-needed-mantic
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hello Corey, or anyone else affected,

Accepted heat into bobcat-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:bobcat-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-bobcat-needed to verification-bobcat-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-bobcat-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-bobcat-needed
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Verification failed on mantic-proposed. It appears the patch was improperly formatted due to a manual edit that prevented the 2nd line of the patch from being applied.

The new patch diff that should fix it (I'll test before uploading):

diff --git a/debian/patches/install-missing-files.patch b/debian/patches/install-missing-files.patch
index 91f0ad08..f143fb98 100644
--- a/debian/patches/install-missing-files.patch
+++ b/debian/patches/install-missing-files.patch
@@ -4,6 +4,6 @@ Author: Corey Bryant <email address hidden>

 --- /dev/null
 +++ b/MANIFEST.in
-@@ -0,0 +1 @@
+@@ -0,0 +1,2 @@
 +recursive-include heat/db/ *
 +recursive-include heat/cloudinit/ *

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

The build looks better with updated patch:

drwxr-xr-x root/root 0 2023-11-07 19:26 ./usr/lib/python3/dist-packages/heat/cloudinit/
-rw-r--r-- root/root 0 2023-10-04 11:09 ./usr/lib/python3/dist-packages/heat/cloudinit/__init__.py
-rwxr-xr-x root/root 552 2023-10-04 11:09 ./usr/lib/python3/dist-packages/heat/cloudinit/boothook.sh
-rw-r--r-- root/root 171 2023-10-04 11:09 ./usr/lib/python3/dist-packages/heat/cloudinit/config
-rw-r--r-- root/root 4188 2023-10-04 11:09 ./usr/lib/python3/dist-packages/heat/cloudinit/loguserdata.py
-rw-r--r-- root/root 1530 2023-10-04 11:09 ./usr/lib/python3/dist-packages/heat/cloudinit/part_handler.py

And it tested successfully.

New heat package version 1:21.0.0-0ubuntu2.2 uploaded to mantic unapproved queue.

Changed in heat (Ubuntu Mantic):
status: Fix Committed → Triaged
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.