diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2017-11-29 00:06:44 +0100 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2018-02-06 23:40:38 +0100 |
commit | f49be97051c3c5c8bb4386d236197103d3682720 (patch) | |
tree | 9b468dad5afbf51cc8ffb82df88754bf11d1d13f /mcp/scripts | |
parent | b6689c3e319b66b64bc0fe49366dfdeb4152e664 (diff) |
Add NOVCP HA OVS scenario (baremetal, virtual)
Add a new class of scenarios, based on existing baremetal HA
scenarios, but instead of having a virtualized control plane (VCP),
all Openstack controller services will run directly on the cluster
nodes.
This change adds the common scaffolding, as well as the OVS scenario.
The new scenario(s) can be used on full-baremetal clusters, soon on
full-virtual clusters and later on hybrid (virt + bare) clusters.
This change defines old (current) style scenario definitions for
both baremetal and virtual, both named:
- os-nosdn-nofeature-novcp-ha;
Prerequisites:
1. Merge-able by name reclass.storage.node definitions
Each cluster (e.g. database, telemetry) adds its own set of
reclass storage node defitions, which for novcp scenarios should
be merged into a single node (kvm) based on the 'name' property.
This is not currently supported by upstream reclass 'node.sls'
high state, so add support for it via an early patch (required
before salt-master-init.sh tries to handle reclass.storage).
2. common reclass classes for novcp
Some of the classes in `baremetal-...-common-ha` are not fit for
novcp as they define VCP-specific config/inheritance, so add new
versions of said classes with novcp in mind or adapt old classes:
- parameterize ctl hostname in `openstack_compute.yml`;
- new `openstack_control_novcp.yml`;
- new `openstack_init_novcp.yml`;
3. Handle hard set names in state files for baremetal nodes
Some of our state files (e.g. maas) hardcodes baremetal node names
to 'kvm', 'cmp', so we need to align the names in novcp scenario
with these values to re-use the maas state. As a future improvement
we should parameterize these names in all state files.
As a consequence, our baremetal controller nodes will also use
'kvm*' hostnames (instead of 'ctl*').
4. Add 'noifupdown' to all interfaces on kvm nodes to prevent duplicate
IPs/routes created at *any* ifup due to /etc/network/route-br-ex.
Patch salt-formula-linux to skip network restart on 'noifupdown',
also when routes are present on that interface.
JIRA: FUEL-310
Change-Id: Ic67778f63e5ee0334dbfe9547c7109ec1a938d61
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'mcp/scripts')
-rw-r--r-- | mcp/scripts/lib.sh | 7 | ||||
-rwxr-xr-x | mcp/scripts/salt.sh | 4 |
2 files changed, 5 insertions, 6 deletions
diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh index 5b00c7380..8e9ba97a9 100644 --- a/mcp/scripts/lib.sh +++ b/mcp/scripts/lib.sh @@ -449,12 +449,11 @@ function wait_for { for attempt in $(seq "${total_attempts}"); do echo "[wait_for] Attempt ${attempt}/${total_attempts%.*} for: ${cmdstr}" if [ "${total_attempts%.*}" = "${total_attempts}" ]; then - # shellcheck disable=SC2015 eval "${cmdstr}" && echo "[wait_for] OK: ${cmdstr}" && return 0 || true else - ! (eval "${cmdstr}" || echo __fuel_wf_failure__) |& tee /dev/stderr | \ - grep -Eq '(Not connected|No response|__fuel_wf_failure__)' && \ - echo "[wait_for] OK: ${cmdstr}" && return 0 || true + ! (eval "${cmdstr}" || echo 'No response') |& tee /dev/stderr | \ + grep -Eq '(Not connected|No response)' && \ + echo "[wait_for] OK: ${cmdstr}" && return 0 || true fi sleep "${sleep_time}" done diff --git a/mcp/scripts/salt.sh b/mcp/scripts/salt.sh index 15168c0cc..824cada7b 100755 --- a/mcp/scripts/salt.sh +++ b/mcp/scripts/salt.sh @@ -106,10 +106,10 @@ ssh ${SSH_OPTS} "${SSH_SALT}" bash -s -e << SALT_INSTALL_END wait_for 3.0 'salt -C "E@^(${NODE_MASK}|cfg01).*" state.apply salt' wait_for 3.0 'salt -C "E@^(${NODE_MASK}).*" state.sls linux.system,linux.storage' - salt -C "E@^(${NODE_MASK}).*" state.sls linux.network -b 1 || true + wait_for 2.0 'salt -C "E@^(${NODE_MASK}).*" state.sls linux.network' || true salt -C "E@^(${NODE_MASK}).*" system.reboot wait_for 90.0 'salt -C "E@^(${NODE_MASK}).*" test.ping' - wait_for 3.0 'salt -C "E@^(${NODE_MASK}).*" pkg.upgrade refresh=False' + wait_for 3.0 'salt -C "E@^(${NODE_MASK}).*" pkg.upgrade refresh=False dist_upgrade=True' wait_for 3.0 'salt -C "E@^(${NODE_MASK}|cfg01).*" state.sls ntp' |