[Bug 2155160] Re: heat-api.conf references nonexistent WSGI script /usr/bin/heat-api

Guillaume Boutry 2155160 at bugs.launchpad.net
Wed Aug 12 11:39:38 UTC 2026


** Description changed:

+ [ Impact ]
+ 
+  * In Resolute, the `heat-api` Apache vhost points at `/usr/bin/heat-api`, but
+    that file is not installed. The packaged WSGI entry point is
+    `/usr/bin/heat-wsgi-api`.
+ 
+  * Apache consequently cannot load the Heat API. Requests return HTTP 500 and
+    the Apache error log reports that `/usr/bin/heat-api` is missing.
+ 
+  * The upload updates the vhost to use the installed WSGI entry point and adds
+    an autopkgtest check that configured WSGI scripts exist and are executable.
+ 
+ [ Test Plan ]
+ 
+  * Use a disposable Resolute system with Apache. Before enabling
+    `resolute-proposed`, install and enable the released package:
+ 
+        sudo apt update
+        sudo apt install heat-api apache2 libapache2-mod-wsgi-py3 curl
+        sudo a2ensite heat-api
+        sudo systemctl restart apache2
+ 
+  * Confirm the enabled vhost uses the missing path and reproduce the
+ failure:
+ 
+        awk '$1 == "WSGIScriptAlias" { print }' /etc/apache2/sites-enabled/heat-api.conf
+        test ! -e /usr/bin/heat-api
+        test -x /usr/bin/heat-wsgi-api
+        curl -i http://127.0.0.1:8004/ || true
+        sudo tail -n 50 /var/log/apache2/heat_api_error.log
+ 
+  * Enable `resolute-proposed`, install the candidate `heat-api`, `heat-common`,
+    and `python3-heat` packages, and record their versions.
+ 
+  * Confirm the effective vhost now references `/usr/bin/heat-wsgi-api`, validate
+    Apache, restart it, and repeat the request:
+ 
+        awk '$1 == "WSGIScriptAlias" { print }' /etc/apache2/sites-enabled/heat-api.conf
+        sudo apache2ctl configtest
+        sudo systemctl restart apache2
+        curl -i http://127.0.0.1:8004/ || true
+        sudo tail -n 50 /var/log/apache2/heat_api_error.log
+ 
+    Apache must remain active and the log must not contain the earlier
+    missing-script error. Any remaining HTTP 500 must be investigated.
+ 
+  * If a locally modified vhost is retained during upgrade, confirm the enabled
+    configuration itself uses `/usr/bin/heat-wsgi-api`.
+ 
+ [ Where problems could occur ]
+ 
+  * A wrong alias, an unexecutable WSGI script, or an import failure would still
+    prevent Apache from starting or leave Heat API requests returning HTTP 500.
+ 
+  * Locally modified Apache conffiles may retain the old alias during upgrade.
+    Inspecting the enabled vhost is necessary, not merely the packaged file.
+ 
+  * The accompanying autopkgtest covers configured script presence, but it does
+    not prove a fully configured Heat deployment can serve authenticated API
+    requests. The Apache request check covers that boundary.
+ 
+ [ Other Info ]
+ 
+  * LP: #2155160 identifies the regression from the Apache/mod_wsgi packaging
+    transition. The sibling CFN vhost already uses its installed WSGI script and
+    is not changed.
+ 
  Summary:
  
  When heat-api runs under Apache/mod_wsgi (heat ≥ 25.0.0), Apache is unable to start the heat-api vhost because the WSGI script path in debian/heat-api.conf is wrong. Every heat-api request returns a 500 error, and the Apache error log shows:
  "Target WSGI script not found or unable to stat: /usr/bin/heat-api"
  
  Root cause:
  
  The bug was introduced in heat 1:25.0.0~rc1-0ubuntu3 (questing, 2025-09-26) when the heat-api service was migrated from a systemd daemon to Apache/mod_wsgi. The new vhost file debian/heat-api.conf contains:
  "WSGIScriptAlias / /usr/bin/heat-api"
  
  However, no heat package installs /usr/bin/heat-api. The actual WSGI
  entry-point script, installed by python3-heat, is /usr/bin/heat-wsgi-
  api. The sibling vhost file debian/heat-api-cfn.conf is correct
  (/usr/bin/heat-wsgi-api-cfn), making this a straightforward typo in
  heat-api.conf.
  
  Reproduction:
  
  - Install heat-api on questing or resolute
  - a2ensite heat-api && systemctl restart apache2
  - curl -i http://localhost:8004/ -> HTTP 500
  - grep "heat-api" /var/log/apache2/heat_api_error.log -> Target WSGI script not found or unable to stat: /usr/bin/heat-api
  
  After applying the sed one-liner s|WSGIScriptAlias / /usr/bin/heat-
  api$|WSGIScriptAlias / /usr/bin/heat-wsgi-api| to the installed conf
  file and restarting apache2, the heat-api endpoint responds normally.

-- 
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to heat in Ubuntu.
https://bugs.launchpad.net/bugs/2155160

Title:
  heat-api.conf references nonexistent WSGI script /usr/bin/heat-api

Status in Ubuntu Cloud Archive flamingo series:
  New
Status in Ubuntu Cloud Archive gazpacho series:
  New
Status in heat package in Ubuntu:
  Fix Released
Status in heat source package in Questing:
  Won't Fix
Status in heat source package in Resolute:
  New
Status in heat source package in Stonking:
  Fix Released

Bug description:
  [ Impact ]

   * In Resolute, the `heat-api` Apache vhost points at `/usr/bin/heat-api`, but
     that file is not installed. The packaged WSGI entry point is
     `/usr/bin/heat-wsgi-api`.

   * Apache consequently cannot load the Heat API. Requests return HTTP 500 and
     the Apache error log reports that `/usr/bin/heat-api` is missing.

   * The upload updates the vhost to use the installed WSGI entry point and adds
     an autopkgtest check that configured WSGI scripts exist and are executable.

  [ Test Plan ]

   * Use a disposable Resolute system with Apache. Before enabling
     `resolute-proposed`, install and enable the released package:

         sudo apt update
         sudo apt install heat-api apache2 libapache2-mod-wsgi-py3 curl
         sudo a2ensite heat-api
         sudo systemctl restart apache2

   * Confirm the enabled vhost uses the missing path and reproduce the
  failure:

         awk '$1 == "WSGIScriptAlias" { print }' /etc/apache2/sites-enabled/heat-api.conf
         test ! -e /usr/bin/heat-api
         test -x /usr/bin/heat-wsgi-api
         curl -i http://127.0.0.1:8004/ || true
         sudo tail -n 50 /var/log/apache2/heat_api_error.log

   * Enable `resolute-proposed`, install the candidate `heat-api`, `heat-common`,
     and `python3-heat` packages, and record their versions.

   * Confirm the effective vhost now references `/usr/bin/heat-wsgi-api`, validate
     Apache, restart it, and repeat the request:

         awk '$1 == "WSGIScriptAlias" { print }' /etc/apache2/sites-enabled/heat-api.conf
         sudo apache2ctl configtest
         sudo systemctl restart apache2
         curl -i http://127.0.0.1:8004/ || true
         sudo tail -n 50 /var/log/apache2/heat_api_error.log

     Apache must remain active and the log must not contain the earlier
     missing-script error. Any remaining HTTP 500 must be investigated.

   * If a locally modified vhost is retained during upgrade, confirm the enabled
     configuration itself uses `/usr/bin/heat-wsgi-api`.

  [ Where problems could occur ]

   * A wrong alias, an unexecutable WSGI script, or an import failure would still
     prevent Apache from starting or leave Heat API requests returning HTTP 500.

   * Locally modified Apache conffiles may retain the old alias during upgrade.
     Inspecting the enabled vhost is necessary, not merely the packaged file.

   * The accompanying autopkgtest covers configured script presence, but it does
     not prove a fully configured Heat deployment can serve authenticated API
     requests. The Apache request check covers that boundary.

  [ Other Info ]

   * LP: #2155160 identifies the regression from the Apache/mod_wsgi packaging
     transition. The sibling CFN vhost already uses its installed WSGI script and
     is not changed.

  Summary:

  When heat-api runs under Apache/mod_wsgi (heat ≥ 25.0.0), Apache is unable to start the heat-api vhost because the WSGI script path in debian/heat-api.conf is wrong. Every heat-api request returns a 500 error, and the Apache error log shows:
  "Target WSGI script not found or unable to stat: /usr/bin/heat-api"

  Root cause:

  The bug was introduced in heat 1:25.0.0~rc1-0ubuntu3 (questing, 2025-09-26) when the heat-api service was migrated from a systemd daemon to Apache/mod_wsgi. The new vhost file debian/heat-api.conf contains:
  "WSGIScriptAlias / /usr/bin/heat-api"

  However, no heat package installs /usr/bin/heat-api. The actual WSGI
  entry-point script, installed by python3-heat, is /usr/bin/heat-wsgi-
  api. The sibling vhost file debian/heat-api-cfn.conf is correct
  (/usr/bin/heat-wsgi-api-cfn), making this a straightforward typo in
  heat-api.conf.

  Reproduction:

  - Install heat-api on questing or resolute
  - a2ensite heat-api && systemctl restart apache2
  - curl -i http://localhost:8004/ -> HTTP 500
  - grep "heat-api" /var/log/apache2/heat_api_error.log -> Target WSGI script not found or unable to stat: /usr/bin/heat-api

  After applying the sed one-liner s|WSGIScriptAlias / /usr/bin/heat-
  api$|WSGIScriptAlias / /usr/bin/heat-wsgi-api| to the installed conf
  file and restarting apache2, the heat-api endpoint responds normally.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-archive/flamingo/+bug/2155160/+subscriptions




More information about the Ubuntu-openstack-bugs mailing list