Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fast forward upgrade support #14

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e07c558
Begin to add playbook to support fast forward upgrades of OSP
Tehsmash Sep 4, 2018
239f15d
Persist testbed specific network configs for DCI
Tehsmash Sep 26, 2018
2369afb
Ensure NetworkManager is disabled as well as stopped
Tehsmash Sep 26, 2018
0e20d75
Use expect to walk through interactive overcloud update
Tehsmash Sep 26, 2018
609d0a6
Add reboot for compute and controller nodes to update process
Tehsmash Sep 27, 2018
063892d
Add tasks for fast forward upgrade from OSP10 to 13
Tehsmash Sep 27, 2018
e9ab5bf
Fix issue with shell executable argument
Tehsmash Sep 27, 2018
fbe23c1
Ensure we install expect before trying to use it
Tehsmash Sep 27, 2018
1a28165
Ensure that we use sudo to write out the network scripts
Tehsmash Sep 27, 2018
5fcddda
Fix all the linters errors so the checking all the things works
Tehsmash Oct 2, 2018
f0e60ef
Switch to using os-net-config to setup all the network interfaces
Tehsmash Oct 2, 2018
8c7bcc9
Use persist_mapping instead of hwaddr
Tehsmash Oct 2, 2018
9cecc6e
Switch to using kernel names for the network interfaces
Tehsmash Oct 2, 2018
714539e
Ensure that we use full path to source cloud rc files
Tehsmash Oct 3, 2018
ee65abc
Switch OSP13 over to use kernel device naming too
Tehsmash Oct 3, 2018
77f70d4
Ensure we fail the play if the update fails
Tehsmash Oct 3, 2018
1e35e77
Ensure we include rhel registration during OSP10 update
Tehsmash Oct 3, 2018
4ed3625
Ensure we ssh key-scan the overcloud nodes before ansible
Tehsmash Oct 3, 2018
f14f797
Ensure we with_items for compute nodes reboot script
Tehsmash Oct 4, 2018
5a38a0d
Ensure we enable the repos we meant to enable during upgrade
Tehsmash Oct 4, 2018
645d636
Make sure source path for stackrc is correct during upgrade
Tehsmash Oct 4, 2018
5008d24
Output deprecated CLI options to node-info env file during upgrade
Tehsmash Oct 4, 2018
f61488f
Remove rhel subscription config from ffu prepare logic
Tehsmash Oct 4, 2018
fcd1e4f
Ensure that the step1 cleanup tasks don't fail if server shutoff
Tehsmash Oct 5, 2018
1a6b5f0
Try not to delete RHEL subscription during ffu
Tehsmash Oct 4, 2018
52d203f
Use custom ffu repo script to remove ceph-osd repo from list
Tehsmash Oct 12, 2018
4b3ddd6
Enable pulling containers from RH dev repo
Tehsmash Oct 12, 2018
f0c1a89
Try to work around the FFU config download issue
Tehsmash Oct 19, 2018
f1c7cc6
Ensure ffu upgrade pre and conv command use new config files
Tehsmash Oct 22, 2018
9b8fc0b
Ensure we change to all the OSP13 parameters for ML2 during upgrade
Tehsmash Oct 24, 2018
f395604
Remove additional resources from the preupgrade step
Tehsmash Oct 24, 2018
e818178
Ensure we write out configs to json during upgrade
Tehsmash Oct 25, 2018
40ef79b
Disable our drivers in neutron during the upgrade process
Tehsmash Oct 29, 2018
f256a1b
Ensure we write out json converter template during upgrade
Tehsmash Oct 30, 2018
787c39a
Update vars for BXB12 to work with new interface programming
Tehsmash Oct 30, 2018
f240e6e
Re-enable RHEL subscription management in last step of upgrade
Tehsmash Oct 30, 2018
2ff7b4e
Add python-gabbi workaround to osp10-13 upgrade
Tehsmash Nov 1, 2018
b07af6a
Ensure we handle upgrading with the DCI RPM repo enabled
Tehsmash Nov 2, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions installer/step1-provision-undercloud-server.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
---
- hosts: director
gather_facts: false
tasks:
- ping:
register: connect_test
- name: Check connection to director
wait_for_connection:
timeout: 10
ignore_errors: true
register: connect_test

- name: Pre-reinstall cleanup tasks
block:
- name: Gather Facts
setup:

- name: Unregister system from RH if its online still
redhat_subscription:
state: absent
Expand All @@ -31,6 +37,7 @@
when: connect_test is not failed

- hosts: director
gather_facts: false
tasks:
- name: Trigger cobbler to reinstall the server
shell: >
Expand Down
3 changes: 2 additions & 1 deletion installer/step2-install-undercloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,5 @@
vars:
ansible_user: stack
tasks:
- include_tasks: "step2-install-undercloud/{{ dci_topic | lower }}/tasks.yaml"
- name: Include tasks for OSP version
include_tasks: "step2-install-undercloud/{{ dci_topic | lower }}/tasks.yaml"
81 changes: 58 additions & 23 deletions installer/step2-install-undercloud/osp10/tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
path: /home/stack/undercloud.conf
section: DEFAULT
option: local_interface
value: pxe-int
value: "{{ undercloud_local_interface }}"

- name: Set local_ip in undercloud.conf
ini_file:
Expand Down Expand Up @@ -148,7 +148,6 @@
option: dhcp_end
value: "{{ undercloud_local_ip | ipaddr('network/prefix') | ipaddr('99') | ipaddr('address') }}"


- name: Set inspection ip range in undercloud.conf
ini_file:
path: /home/stack/undercloud.conf
Expand All @@ -164,6 +163,63 @@
option: undercloud_admin_password
value: password

# Based on https://github.com/openstack/instack-undercloud/blob/newton-eol/templates/net-config.json.template
# adds Cisco environment specific interfaces that need configuring
- name: Write out the undercloud net config override
copy:
dest: /home/stack/undercloud_net_config.json.template
content: |
{% raw -%}
"network_config": [
{
"type": "ovs_bridge",
"name": "br-ctlplane",
"ovs_extra": [
"br-set-external-id br-ctlplane bridge-id br-ctlplane"
],
"members": [
{
"type": "interface",
"name": "{{LOCAL_INTERFACE}}",
"primary": "true",
"mtu": {{LOCAL_MTU}}
}
],
"addresses": [
{
"ip_netmask": "{{PUBLIC_INTERFACE_IP}}"
}
],
"mtu": {{LOCAL_MTU}}
},
{% endraw %}
{
"type": "interface",
"name": "{{ undercloud_overcloud_interface }}",
"addresses": [
{
"ip_netmask": "{{ overcloud_director_ip }}"
}
]
},
{
"type": "interface",
"name": "{{ undercloud_fake_gw_interface }}",
"addresses": [
{
"ip_netmask": "{{ undercloud_fake_gw_cidr }}"
}
]
}
]

- name: Set net config override in undercloud config
ini_file:
path: /home/stack/undercloud.conf
section: DEFAULT
option: net_config_override
value: "/home/stack/undercloud_net_config.json.template"

- name: Run the undercloud installation
shell: openstack undercloud install

Expand Down Expand Up @@ -212,24 +268,3 @@
source /home/stack/stackrc
openstack subnet set --dns-nameserver {{ dns_server_1 }} default-subnet
when: default_subnet_has_name is failed

# Non-standard Cisco additions to the installer process from here on:

# Cisco specific addition for fake floating ip address gateway
- name: Make sure NetworkManager is not running
systemd:
state: stopped
name: NetworkManager
become: true

- name: Add fake floating ip network gateway
shell: >
ip addr | grep -q {{ undercloud_fake_gw_cidr }} ||
ip addr add {{ undercloud_fake_gw_cidr }} dev {{ undercloud_fake_gw_interface }}
become: true

- name: Add IP in overcloud routable network
shell: >
ip addr | grep -q {{ overcloud_director_ip }} ||
ip addr add {{ overcloud_director_ip }} dev usernet
become: true
78 changes: 58 additions & 20 deletions installer/step2-install-undercloud/osp13/tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
path: /home/stack/undercloud.conf
section: DEFAULT
option: local_interface
value: pxe-int
value: "{{ undercloud_local_interface }}"

- name: Set local_ip in undercloud.conf
ini_file:
Expand Down Expand Up @@ -171,6 +171,63 @@
option: undercloud_admin_password
value: password

# Based on https://github.com/openstack/instack-undercloud/blob/newton-eol/templates/net-config.json.template
# adds Cisco environment specific interfaces that need configuring
- name: Write out the undercloud net config override
copy:
dest: /home/stack/undercloud_net_config.json.template
content: |
{% raw -%}
"network_config": [
{
"type": "ovs_bridge",
"name": "br-ctlplane",
"ovs_extra": [
"br-set-external-id br-ctlplane bridge-id br-ctlplane"
],
"members": [
{
"type": "interface",
"name": "{{LOCAL_INTERFACE}}",
"primary": "true",
"mtu": {{LOCAL_MTU}}
}
],
"addresses": [
{
"ip_netmask": "{{PUBLIC_INTERFACE_IP}}"
}
],
"mtu": {{LOCAL_MTU}}
},
{% endraw %}
{
"type": "interface",
"name": "{{ undercloud_overcloud_interface }}",
"addresses": [
{
"ip_netmask": "{{ overcloud_director_ip }}"
}
]
},
{
"type": "interface",
"name": "{{ undercloud_fake_gw_interface }}",
"addresses": [
{
"ip_netmask": "{{ undercloud_fake_gw_cidr }}"
}
]
}
]

- name: Set net config override in undercloud config
ini_file:
path: /home/stack/undercloud.conf
section: DEFAULT
option: net_config_override
value: "/home/stack/undercloud_net_config.json.template"

# 4.7. INSTALLING THE DIRECTOR
- name: Run the undercloud installation
shell: openstack undercloud install
Expand Down Expand Up @@ -208,25 +265,6 @@

# Non-standard Cisco additions to the installer process from here on:

# Cisco specific addition for fake floating ip address gateway
- name: Make sure NetworkManager is not running
systemd:
state: stopped
name: NetworkManager
become: true

- name: Add fake floating ip network gateway
shell: >
ip addr | grep -q {{ undercloud_fake_gw_cidr }} ||
ip addr add {{ undercloud_fake_gw_cidr }} dev {{ undercloud_fake_gw_interface }}
become: true

- name: Add IP in overcloud routable network
shell: >
ip addr | grep -q {{ overcloud_director_ip }} ||
ip addr add {{ overcloud_director_ip }} dev usernet
become: true

# Work around for python-gabbi version being out of date

- name: Work around for BZ1613475
Expand Down
3 changes: 2 additions & 1 deletion installer/step3-install-overcloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@
vars:
ansible_user: stack
tasks:
- include_tasks: "step3-install-overcloud/{{ dci_topic | lower }}/tasks.yaml"
- name: Include tasks for OSP version
include_tasks: "step3-install-overcloud/{{ dci_topic | lower }}/tasks.yaml"
22 changes: 17 additions & 5 deletions installer/step3-install-overcloud/osp10/tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,16 +195,20 @@
deploy_stdout:
value: {get_attr: [InstallOverrideDefaultPackagesController, deploy_stdout]}

- name: Write out networking-cisco specific config environment
- name: Write out networking-cisco specific config environment resources
copy:
dest: /home/stack/environments/networking-cisco-config.yaml
dest: /home/stack/environments/networking-cisco-config-resources.yaml
content: |
resource_registry:
OS::TripleO::NodeUserData: /usr/share/openstack-tripleo-heat-templates/firstboot/os-net-config-mappings.yaml
OS::TripleO::ControllerExtraConfigPre: /home/stack/templates/controller_extra_config_prepuppet.yaml
OS::TripleO::AllNodesExtraConfig: /home/stack/templates/extended_nodes_extra_config.yaml
OS::TripleO::NetCiscoOriginal: /usr/share/openstack-tripleo-heat-templates/puppet/extraconfig/all_nodes/neutron-ml2-cisco-nexus-ucsm.yaml

- name: Write out networking-cisco specific config environment params
copy:
dest: /home/stack/environments/networking-cisco-config-params.yaml
content: |
parameter_defaults:
InternalApiNetworkVlanID: {{ testbed_vlan }}
StorageNetworkVlanID: {{ storage_vlan }}
Expand Down Expand Up @@ -264,12 +268,18 @@
ComputeHostnameFormat: '{{ overcloud_node_prefix }}-%stackname%-compute-%index%'
ControllerHostnameFormat: '{{ overcloud_node_prefix }}-%stackname%-controller-%index%'

- name: Write out RHEL subscription manager environment file
- name: Write out RHEL subscription manager environment file delete sub
copy:
dest: /home/stack/environments/rhel_sub_config.yaml
dest: /home/stack/environments/delete_rhelsub.yaml
content: |
parameter_defaults:
DeleteOnRHELUnregistration: true

- name: Write out RHEL subscription manager environment file parameters
copy:
dest: /home/stack/environments/rhel_sub_config.yaml
content: |
parameter_defaults:
rhel_reg_auto_attach: ""
rhel_reg_activation_key: ""
rhel_reg_org: ""
Expand Down Expand Up @@ -302,7 +312,9 @@
-e /home/stack/environments/overcloud-config.yaml \
-e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml \
-e /usr/share/openstack-tripleo-heat-templates/environments/net-bond-with-vlans.yaml \
-e /home/stack/environments/networking-cisco-config.yaml \
-e /home/stack/environments/networking-cisco-config-resources.yaml \
-e /home/stack/environments/networking-cisco-config-params.yaml \
-e /home/stack/environments/delete_rhelsub.yaml \
-e /home/stack/environments/rhel_sub_config.yaml \
-e /usr/share/openstack-tripleo-heat-templates/extraconfig/pre_deploy/rhel-registration/rhel-registration-resource-registry.yaml \
--ntp-server 1.ntp.esl.cisco.com
Loading