Support OpenStack major release upgrade by Chef

Registered by Xu Han Peng

Use Chef cookbook to upgrade one or more OpenStack nodes which has OpenStack services installed. The upgrade includes backing up OpenStack data and configurations, update service code, migrate database data and modify configuration data based on major release configuration change. When upgrade fails, rollback to version before upgrade.

One is to allow some control over package handling between releases.
One good idea is something like this:

package_list.each do |pkg|
  package pkg do
    action node["openstack"]["do_package_upgrades"] == true ? :upgrade : :install
    options platform_options["package_options"]
  end
end
This gives me the option of leaving all packages alone, until I have tested new packages and can flip the switch (by changing the environment variable) to do upgrades

Some other considerations to understand before moving forward with control:

Would it be better to just create a wrapper resource in Common that would hide all that logic within one place? Logic being control and platform options.
Do we want cookbook level control?
Do we want package level control?
Should there be separate control over the libvirt and compute hypervisor package upgrade?

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
Xu Han Peng
Direction:
Needs approval
Assignee:
Xu Han Peng
Definition:
Obsolete
Series goal:
None
Implementation:
Deferred
Milestone target:
None
Completed by
Mark Vanderwiel

Whiteboard

There's some consistency now with the cookbooks using the package :update action. But there's much more to this. A couple of items:

- The current packages do NOT notify the services they provide to restart if updated. When should the restart happen? delay or immediate?
- The current packages do NOT cover ALL the dependencies of a package or service such that what a package has has several dependencies (not explicitly covered within the rpm as a dependent version bump). This is probably an issue with how each repo (like RDO) is built.
- The current packages do NOT handle the various platform specific init script providers (Trusty/Utopic vs Precise)

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.