Bug 2214039

Summary: DCN: Update to 10. Precaching glance images into nova
Product: Red Hat OpenStack Reporter: Marian Krcmarik <mkrcmari>
Component: documentationAssignee: Roger Heslop <rheslop>
Status: CLOSED CURRENTRELEASE QA Contact: RHOS Documentation Team <rhos-docs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 17.1 (Wallaby)CC: rheslop
Target Milestone: ---Keywords: Documentation, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-27 18:43:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marian Krcmarik 2023-06-11 10:18:50 UTC
Description of problem:
The Chapter 10. Precaching glance images into nova -> 10.1. Running the tripleo_nova_image_cache.yml ansible playbook -> Procedure: Step 1. of The DCN documentation needs an update:
https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.2/html/distributed_compute_node_and_storage_deployment/precaching-glance-images-into-nova#proc_ansible-image-cache-playbook_precaching-glance-images

The content of the first step:
Create an ansible inventory file for the stack. You can specify multiple stacks in a comma delimited list to cache images at more than one site:

$ source stackrc

$ tripleo-ansible-inventory --plan central,dcn0,dcn1 \
--static-yaml-inventory inventory.yaml

is valid for 16.x but needs an update for 17.x. 
If you run tripleo-ansible-inventory command on 17.x It gives a warning that tool is deprecated.
$ tripleo-ansible-inventory --plan central,dcn0,dcn1 \
--static-yaml-inventory inventory.yaml
DEPRECATED - This script has been deprecated.Use the inventory file tripleo-ansible-inventory.yaml located under ~/tripleo-deploy/<stack> for a Standalone/Undercloud deployment or overcloud-deploy/<stack> for the Overcloud. 
To generate an inventory file, use the playbook in tripleo-ansible: cli-config-download.yaml

The step needs to be updated accordingly, the ansible inventory are generated for each stack in config-download directory - i.e.:
/home/stack/overcloud-deploy/dcn1/config-download/dcn1/tripleo-ansible-inventory.yaml
I am not aware of how to create the ansible inventory for all stacks so the command to cache nova images should be ran probably for each desired stack/site with the ansible inventory generated after the stack/site deployment in config-download directory, i.e.:
ansible-playbook -i ../overcloud-deploy/dcn1/config-download/dcn1/tripleo-ansible-inventory.yaml --extra-vars "@../nova_cache_args.yml" /usr/share/ansible/tripleo-playbooks/tripleo_nova_image_cache.yml

Comment 1 Marian Krcmarik 2023-06-11 17:16:27 UTC
Actually upstream docs have this already nicely updated:
https://docs.openstack.org/project-deploy-guide/tripleo-docs/latest/post_deployment/pre_cache_images.html