Bug 1757310 - [RFE][Deplyoment][Glance]Configure periodic job to prefetch images into glance cache via TripleO
Summary: [RFE][Deplyoment][Glance]Configure periodic job to prefetch images into glanc...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 16.0 (Train)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Alpha
: 16.2 (Train on RHEL 8.4)
Assignee: Pranali Deore
QA Contact: Mike Abrams
URL:
Whiteboard:
Depends On:
Blocks: 1802774 1790755
TreeView+ depends on / blocked
 
Reported: 2019-10-01 07:39 UTC by Pranali Deore
Modified: 2021-09-15 07:08 UTC (History)
11 users (show)

Fixed In Version: puppet-glance-15.4.1-2.20210208204921.aa0e036.el8 openstack-tripleo-heat-templates-11.4.1-2.20210208205916.dfc4da5.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-09-15 07:07:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 729836 0 None MERGED Add cache prefetcher interval configuration option 2021-02-15 13:24:29 UTC
OpenStack gerrit 729839 0 None MERGED Enable glance cache prefetcher interval 2021-02-15 13:24:29 UTC
Red Hat Product Errata RHEA-2021:3483 0 None Waiting on Red Hat [RHOCP4] Support policy and version naming rule of oc client 2022-04-15 11:03:42 UTC

Description Pranali Deore 2019-10-01 07:39:40 UTC
Description of problem:

Add new configuration parameters in puppet-glance & THT, so that it can configure 
newly added glance periodic job which will run as per interval set in
configuration option and fetch images which are queued for caching in cache 
directory.

Ref: https://review.opendev.org/#/c/627453/
     https://review.opendev.org/#/c/672877/5

Comment 6 Alan Bishop 2020-06-09 20:09:52 UTC
@Pranali, assigning this back to you. Your upstream patches merged, and since this BZ has been retargeted to OSP-17 (Victoria) then I think you can move it to POST.

@Greg, since this is now targeted for 17, should it be removed as a blocker on bug #1802774?

Comment 14 Cyril Roelandt 2021-02-09 03:40:53 UTC
The latest versions of puppet-glance and tripleo-heat-templates should have the required patches:

puppet-glance-15.4.1-2.20210208204921.aa0e036.el8
openstack-tripleo-heat-templates-11.4.1-2.20210208205916.dfc4da5.el8


Setting this to MODIFIED.

Comment 19 Mike Abrams 2021-05-19 08:47:37 UTC
=== verify prefetcher interval set in glance-api.conf on containers:

(undercloud) [stack@undercloud-0 ~]$ for i in 41 49 53; do echo "=== $i"; ssh -t heat-admin.24.$i "sudo podman exec -it -u root glance_api sh -c 'grep ^cache_prefetcher_interval /etc/glance/glance-api.conf| grep -v ^# ' 2> /dev/null"; done 
=== 41
Warning: Permanently added '192.168.24.41' (ECDSA) to the list of known hosts.
cache_prefetcher_interval=300
Connection to 192.168.24.41 closed.
=== 49
Warning: Permanently added '192.168.24.49' (ECDSA) to the list of known hosts.
cache_prefetcher_interval=300
Connection to 192.168.24.49 closed.
=== 53
Warning: Permanently added '192.168.24.53' (ECDSA) to the list of known hosts.
cache_prefetcher_interval=300
Connection to 192.168.24.53 closed.
(undercloud) [stack@undercloud-0 ~]$

=== perform various glance-cache-manage ops:

(overcloud) [stack@undercloud-0 ~]$ . ./overcloudrc 
(overcloud) [stack@undercloud-0 ~]$ glance image-list
+--------------------------------------+----------------+
| ID                                   | Name           |
+--------------------------------------+----------------+
| fdd9c31b-6d0d-4971-8f8f-cbf7924f14ce | ciros-test-001 |
+--------------------------------------+----------------+
(overcloud) [stack@undercloud-0 ~]$ ssh -t heat-admin.24.53
Warning: Permanently added '192.168.24.53' (ECDSA) to the list of known hosts.
Last login: Wed May 19 08:32:41 2021 from 192.168.24.1
[heat-admin@controller-0 ~]$ . ./overcloudrc 
(overcloud) [heat-admin@controller-0 ~]$ glance image-list
+--------------------------------------+----------------+
| ID                                   | Name           |
+--------------------------------------+----------------+
| fdd9c31b-6d0d-4971-8f8f-cbf7924f14ce | ciros-test-001 |
+--------------------------------------+----------------+
(overcloud) [heat-admin@controller-0 ~]$ ls
glance_pod.sh  overcloudrc
(overcloud) [heat-admin@controller-0 ~]$ ./glance_pod.sh 
bash-4.4$ glance-cache-manage --host=172.17.1.24 list-cached
No cached images.
bash-4.4$ glance-cache-manage --host 172.17.1.24 queue-image fdd9c31b-6d0d-4971-8f8f-cbf7924f14ce
Queue image fdd9c31b-6d0d-4971-8f8f-cbf7924f14ce for caching? [y/N] y
bash-4.4$ sleep 360
^C
bash-4.4$ glance-cache-manage --host=172.17.1.24 list-queued
Found 1 queued images...
+--------------------------------------+
|                  ID                  |
+--------------------------------------+
| fdd9c31b-6d0d-4971-8f8f-cbf7924f14ce |
+--------------------------------------+
bash-4.4$ sleep 300
^C
bash-4.4$ glance-cache-manage --host=172.17.1.24 list-queued
No queued images.
bash-4.4$ glance-cache-manage --host=172.17.1.24 list-cached
Found 1 cached images...
+--------------------------------------+----------------------------+----------------------------+----------+------+
|                  ID                  |    Last Accessed (UTC)     |    Last Modified (UTC)     |     Size | Hits |
+--------------------------------------+----------------------------+----------------------------+----------+------+
| fdd9c31b-6d0d-4971-8f8f-cbf7924f14ce | 2021-05-19T08:36:11.909625 | 2021-05-19T08:36:11.909625 | 12528640 |    0 |
+--------------------------------------+----------------------------+----------------------------+----------+------+
bash-4.4$ glance-cache-manage --host=172.17.1.24 delete-all-cached-images
Delete all cached images? [y/N] y
bash-4.4$ glance-cache-manage --host=172.17.1.24 list-cached
No cached images.
bash-4.4$ glance-cache-manage --host 172.17.1.24 queue-image fdd9c31b-6d0d-4971-8f8f-cbf7924f14ce
Queue image fdd9c31b-6d0d-4971-8f8f-cbf7924f14ce for caching? [y/N] y
bash-4.4$ glance-cache-manage --host=172.17.1.24 list-queued
Found 1 queued images...
+--------------------------------------+
|                  ID                  |
+--------------------------------------+
| fdd9c31b-6d0d-4971-8f8f-cbf7924f14ce |
+--------------------------------------+
bash-4.4$ glance-cache-manage --host=172.17.1.24 delete-queued-image   fdd9c31b-6d0d-4971-8f8f-cbf7924f14ce
Delete queued image fdd9c31b-6d0d-4971-8f8f-cbf7924f14ce? [y/N] y
bash-4.4$ glance-cache-manage --host=172.17.1.24 list-queued
No queued images.
bash-4.4$ glance-cache-manage --host 172.17.1.24 queue-image fdd9c31b-6d0d-4971-8f8f-cbf7924f14ce
Queue image fdd9c31b-6d0d-4971-8f8f-cbf7924f14ce for caching? [y/N] y
bash-4.4$ glance-cache-manage --host=172.17.1.24 list-queued
Found 1 queued images...
+--------------------------------------+
|                  ID                  |
+--------------------------------------+
| fdd9c31b-6d0d-4971-8f8f-cbf7924f14ce |
+--------------------------------------+
bash-4.4$ glance-cache-manage --host=172.17.1.24 delete-all-queued-images
Delete all queued images? [y/N] y
bash-4.4$ glance-cache-manage --host=172.17.1.24 list-queued
No queued images.
bash-4.4$ 

bash-4.4$ glance-cache-manage --host 172.17.1.24 queue-image fdd9c31b-6d0d-4971-8f8f-cbf7924f14ce
Queue image fdd9c31b-6d0d-4971-8f8f-cbf7924f14ce for caching? [y/N] y
bash-4.4$
...
bash-4.4$ glance-cache-manage --host=172.17.1.24 list-cached
Found 1 cached images...
+--------------------------------------+----------------------------+----------------------------+----------+------+
|                  ID                  |    Last Accessed (UTC)     |    Last Modified (UTC)     |     Size | Hits |
+--------------------------------------+----------------------------+----------------------------+----------+------+
| fdd9c31b-6d0d-4971-8f8f-cbf7924f14ce | 2021-05-19T08:46:12.381134 | 2021-05-19T08:46:12.381134 | 12528640 |    0 |
+--------------------------------------+----------------------------+----------------------------+----------+------+
bash-4.4$ glance-cache-manage --host=172.17.1.24 delete-all-cached-images
Delete all cached images? [y/N] y
bash-4.4$ glance-cache-manage --host=172.17.1.24 list-cached
No cached images.
bash-4.4$

bash-4.4$ glance-cache-manage --host=172.17.1.24 delete-cached-image fdd9c31b-6d0d-4971-8f8f-cbf7924f14ce
Delete cached image fdd9c31b-6d0d-4971-8f8f-cbf7924f14ce? [y/N] y
bash-4.4$ 

VERIFIED

Comment 21 errata-xmlrpc 2021-09-15 07:07:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform (RHOSP) 16.2 enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2021:3483


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