Bug 2227676 - [RHOSP16.2.5] The glance_api_cron container is created and tripleo_glance_api_cron_healthcheck.service fails post FFU from RHOSP 13 to 16.2.5
Summary: [RHOSP16.2.5] The glance_api_cron container is created and tripleo_glance_api...
Keywords:
Status: MODIFIED
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 16.2 (Train)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z6
: 16.2 (Train on RHEL 8.4)
Assignee: Manoj Katari
QA Contact: Joe H. Rahme
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-07-31 05:55 UTC by Anjana
Modified: 2023-08-02 12:49 UTC (History)
6 users (show)

Fixed In Version: openstack-tripleo-heat-templates-11.6.1-2.20230717085025.1608f56.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 886851 0 None MERGED [Train Only] Run glance cron only when glance cache is enabled. 2023-08-02 04:53:23 UTC
Red Hat Issue Tracker OSP-27030 0 None None None 2023-07-31 05:56:58 UTC

Description Anjana 2023-07-31 05:55:25 UTC
Description of problem:

In RHOSP 16.2.5, the glance_api_cron container is created even though the image cache feature of glance is not enabled[1]

In that case, tripleo_glance_api_cron_healthcheck.service will fail if the Image cache of the glance is not enabled.[2]

It is assumed that this may be due to the fact that cron jobs are not created in the glance_api_cron container if the glance image cache is not enabled.[3]


[1] 
[root@control01tbmoc ~]# podman ps|grep glance
f873fc92a78e  undercloudtb.ctlplane.localdomain:8787/rhosp-rhel8/openstack-glance-api:16.2                 kolla_start           2 weeks ago     Up 2 weeks ago             glance_api
3f9bfe1b37e0  undercloudtb.ctlplane.localdomain:8787/rhosp-rhel8/openstack-glance-api:16.2                 kolla_start           2 weeks ago     Up 2 weeks ago             glance_api_cron


/var/lib/config-data/puppet-generated/glance_api/etc/glance/glance-api.conf:
~~~
...
[paste_deploy]
...
flavor=keystone
...
~~~

[2]

[root@control01tbmoc ~]# systemctl status tripleo_glance_api_cron_healthcheck.service
● tripleo_glance_api_cron_healthcheck.service - glance_api_cron healthcheck
   Loaded: loaded (/etc/systemd/system/tripleo_glance_api_cron_healthcheck.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2023-07-26 10:32:33 +08; 31s ago
  Process: 418699 ExecStart=/usr/bin/podman exec --user root glance_api_cron /usr/share/openstack-tripleo-common/healthcheck/cron glance (code=exited, status=1/FAILURE)
 Main PID: 418699 (code=exited, status=1/FAILURE)

[3]
[root@control01tbmoc ~]# podman exec -it glance_api_cron crontab -l
no crontab for root
WARN[0000] Error resizing exec session 9ba6504bcfb042f73bb11837a07ab5ebd3fd0933b259fb5382a446f14160ec8c: could not open ctl file for terminal resize for container 3f9bfe1b37e0e1c8b51989b0151bde4382e41f14c8f841127eafa6be79ea451c: open /var/lib/containers/storage/overlay-containers/3f9bfe1b37e0e1c8b51989b0151bde4382e41f14c8f841127eafa6be79ea451c/userdata/9ba6504bcfb042f73bb11837a07ab5ebd3fd0933b259fb5382a446f14160ec8c/ctl: no such device or address

[root@control01tbmoc ~]# podman exec -it glance_api_cron cat /usr/share/openstack-tripleo-common/healthcheck/cron
#!/bin/bash


file="${1:-root}"
if [ -f /var/spool/cron/${file} ]; then
    nb_lines=$(grep -cEv '^#' /var/spool/cron/${file})
    if [ $nb_lines -ge 2 ]; then
        exit 0
    fi
fi
exit 1
WARN[0000] Error resizing exec session f40464e695091fc8a10cb04f34f5b8c5d3cad262af1c90cbec2859fd7ecd5551: could not open ctl file for terminal resize for container 3f9bfe1b37e0e1c8b51989b0151bde4382e41f14c8f841127eafa6be79ea451c: open /var/lib/containers/storage/overlay-containers/3f9bfe1b37e0e1c8b51989b0151bde4382e41f14c8f841127eafa6be79ea451c/userdata/f40464e695091fc8a10cb04f34f5b8c5d3cad262af1c90cbec2859fd7ecd5551/ctl: no such device or address



Version-Release number of selected component (if applicable):
puppet-glance-15.5.0-2.20220804175403.d54e942.el8ost.noarch

How reproducible:

This always happens when Image cache is disabled in RHOSP16.2.5

Actual results:
tripleo_glance_api_cron_healthcheck.service fail

Expected results:
tripleo_glance_api_cron_healthcheck.service does not fail



Additional info:

found this bugzilla similar to the error,

https://bugzilla.redhat.com/show_bug.cgi?id=2159566 

but the bugzilla is for RHOSP version 16.2.4 and the resolution is to upgrade to 16.2.5

The solution cannot be applied here as the customer environment is already 16.2.5

Comment 1 David Rosenfeld 2023-07-31 12:38:08 UTC
Is it this: https://bugzilla.redhat.com/show_bug.cgi?id=2142951 ? If so please mark as duplicate.

Comment 9 Manoj Katari 2023-08-02 07:32:40 UTC
@Takashi  Sure, assigned it to me.


Note You need to log in before you can comment on or make changes to this bug.