-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adoption of public SSH key for Amphorae
OSPNET-1078
- Loading branch information
Showing
4 changed files
with
76 additions
and
1 deletion.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
docs_user/assemblies/proc_adopting-the-loadbalancer-dataplane.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
[id="adopting-the-loadbalancer-dataplane_{context}"] | ||
|
||
= {loadbalancer_service} data plane adoption | ||
At this point all services on the new control plane should be running including | ||
the {loadbalancer_service} services. | ||
|
||
== Failover load balancers in ERROR state | ||
|
||
As the management network configuration and the controller IP has changed | ||
in the new control plane the amphora load balancers will show up in ERROR | ||
state at this point. | ||
|
||
[source,bash] | ||
---- | ||
$ openstack loadbalancer list | ||
+--------------------------------------+------+----------------------------------+--------------+---------------------+------------------+----------+ | ||
| id | name | project_id | vip_address | provisioning_status | operating_status | provider | | ||
+--------------------------------------+------+----------------------------------+--------------+---------------------+------------------+----------+ | ||
| 5dabaa20-d9df-42a7-b74e-8533ac99b152 | lb1 | c388c1dbd3ff40009a523726e009b4cf | 172.24.4.250 | ERROR | ONLINE | amphora | | ||
+--------------------------------------+------+----------------------------------+--------------+---------------------+------------------+----------+ | ||
---- | ||
|
||
A failover is necessary to configure the loadbalancers for the new environment and to | ||
upgrade them to use the new amphora image. | ||
|
||
[source,bash] | ||
---- | ||
$ openstack loadbalancer failover --wait 5dabaa20-d9df-42a7-b74e-8533ac99b152 | ||
---- | ||
|
||
This can be automated if necessary. The following script does this by | ||
failing over all loadbalancers in error, but only five at a time. | ||
|
||
// TODO(tweining): test | ||
|
||
[source,bash] | ||
---- | ||
# TODO(tweining): verify it is provisioning status, not operating status | ||
$ openstack loadbalancer list --operating-status OFFLINE -f value -c id | \ | ||
xargs -P 5 -I {} openstack loadbalancer failover --wait {} | ||
---- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
- name: Migrate old Octavia public SSH key for amphorae | ||
ansible.builtin.shell: | | ||
{{ shell_header }} | ||
{{ oc_header }} | ||
CONTROLLER1_SCP="{{ controller1_ssh | regex_replace('^ssh', 'scp')}}" | ||
${CONTROLLER1_SCP}:/etc/octavia/ssh/octavia_id_rsa.pub $HOME/octavia_sshkey.pub | ||
# Install new data in k8s | ||
oc apply -f - <<EOF | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: sshPubkey | ||
namespace: openstack | ||
data: | ||
key: $(cat $HOME/octavia_sshkey.pub) | ||
EOF | ||
rm -f $HOME/octavia_sshkey.pub |