The instack instructions say that an undercloud can be upgraded just by running yum update, however any changes to openstack-tripleo-heat-templates won't be pulled into the tuskar database unless /usr/libexec/os-refresh-config/configure.d/90-tuskar-db-sync is run again (and I could only get this to work by deleting the tuskar database and running all tuskar os-refresh-config scripts) I have a couple of questions: - Is there a documented way to sync the tuskar db with openstack-tripleo-heat-templates which doesn't involve a full os-refresh-config run? - Has tuskar considered moving to a model where template files are not stored in the database so that no synchronisation is needed at all?
I ran into this too last week. There's a process that we can document, but unfortunately it's going to involve deleting the plan and recreating it. Tuskar supports versioned roles which was supposed to answer this, but we don't have the client workflow in place for upgrading a plan to use a newer version of the role. The reason they are stored in the DB is that they were supposed to be stored in swift but their APIs didn't support what we needed yet. The local DB was supposed to be a temporary thing. The reason for storing them at all is the versioning; if a new version of the templates come out, we can't just blanket replace the existing ones since it will invalidate existing plans that contain configuration for the old versions of the templates.
Maybe the first step is to get most of the logic into their own /usr/bin/tuskar-* scripts, so these can be called by os-refresh-config or manually.
Agreed. I've had that on my todo list for a while, but it keeps getting bumped. Now that I have a bug to hang the work off of, I'll try to prioritize it and get started on it today.
First part of this is at: https://review.openstack.org/191170
so the current way I reload roles is like: roles=`tuskar role-list | grep OpenStack | awk '{print $2}'` tuskar plan-delete overcloud tuskar-delete-roles --config-file /etc/tuskar/tuskar.conf --uuids $roles # manually execute the load-roles script from the tuskar image element to load roles and extra data roles=`tuskar role-list | grep OpenStack | awk '{print $2}'` tuskar plan-create overcloud plan_id=`tuskar plan-list | grep overcloud | awk '{print $2}'` for role in ${roles[@]}; do tuskar plan-add-role -r $role $plan_id; done The workflow I'm aiming for is like: 1. tuskar plan-delete overcloud 2. tuskar-delete-roles --config-file /etc/tuskar/tuskar.conf --all 3. tuskar plan-create overcloud 4. tuskar load-roles --config-file /etc/tuskar/tuskar.conf --all 5. tuskar plan-add-role --all ==== 2. is the review jdob has out @ https://review.openstack.org/191170 4. there is no --all flag to load-roles, I add this @ https://review.openstack.org/#/c/194224/ 5. there is no --all flag to plan-add-role, I'll be visiting this soon unless someone beats me, if you do, please update here. Also please comment if you think the workflow I'm aiming for makes sense given what we currently have and as a workflow we can at least document for when someone wants to reload their tripleo heat templates and then tuskar roles.
added the --all for plan-add-role @ (tuskarclient) https://review.openstack.org/#/c/194693/ with this, and the two tuskar patches in place I can do: tuskar plan-delete overcloud tuskar-delete-roles --all tuskar-load-roles --all -tht ./TEMPLATES_TEST/openstack-tripleo-heat-templates/ tuskar plan-create overcloud tuskar plan-add-role --all-roles ef2370b9-a139-458c-aab7-b55cbbc4323a deploy
This looks good. Do we want to change the os-refresh-config scripts to use these same calls instead of the bash they do today? It doesn't have to be part of this bug (we can file it separately), just something to think about.
(I have added a section to the Advanced Deployment section of the docs for reloading of roles and plans, at https://review.gerrithub.io/241459 "Updates docs for for recreation of deployment plan and roles ") To reset the deployment plan and all deployment roles: # 1. Delete the management plan: openstack management plan delete PLAN_UUID # openstack management plan list will show you the plan and its uuid # 2. Delete the management roles: roles=`tuskar role-list | grep OpenStack | awk '{print $2}'` tuskar-delete-roles --config-file /etc/tuskar/tuskar.conf --uuids $roles # 3. Recreate the management roles: /usr/share/tripleo-image-elements/tuskar/os-refresh-config/configure.d/90-tuskar-db-sync # Note: this script defaults to /usr/share/openstack-tripleo-heat-templates/ # for the tripleo-heat-templates to use in the role definitions. This can be # overridden with the TUSKAR_ROLE_DIRECTORY environment variable: TUSKAR_ROLE_DIRECTORY=/foo /usr/share/tripleo-image-elements/tuskar/os-refresh-config/configure.d/90-tuskar-db-sync # 4. Create a new management plan and associate the newly created roles to it: /usr/share/tripleo-image-elements/tuskar/os-refresh-config/post-configure.d/101-plan-add-roles For step 2 we actually already have an upstream '--all' flag for tuskar delete-roles @ [1] (jdob, merged upstream, but not in openstack-tuskar-0.4.18-3.el7ost.noarch ). For step 3 we have an upstream '--all' flag for tuskar load-roles @ [2] (marios, unmerged) For step 4 we have an upstream '--all' flag for tuskar plan-add-role @ [3] (marios, unmgerged) With these applied the workflow becomes: openstack management plan delete PLAN_UUID # openstack management plan list will show you the plan and its uuid tuskar-delete-roles --all tuskar-load-roles --all -tht ./TEMPLATES_TEST/openstack-tripleo-heat-templates/ tuskar plan-create overcloud tuskar plan-add-role --all-roles NEW_PLAN_UUID
woops :) [1] https://review.openstack.org/191170 [2] https://review.openstack.org/#/c/194224/ [3] https://review.openstack.org/#/c/194693/
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions
This bug is against a Version which has reached End of Life. If it's still present in supported release (http://releases.openstack.org), please update Version and reopen.