Rework bring up networking during optimized restore
There were three new issues observed.
It is possible for IPv6 to have multiple default routes.
The existing regex was created for one or none. Replaced
regex with grep to handle none, one, or multiple entries.
e.g.
$ ip -6 route show default
default via ffff::1234 dev enp22s0f1 proto ra metric 1024 expires 1798sec hoplimit 64 pref medium
default via ffff::8888 dev enp22s0f1 proto ra metric 1024 expires 1642sec hoplimit 64 pref medium
dcmanager could timeout if networking takes too long to restart.
The gateway interfaces will no longer be reset. This way the interface
SSH should be on will not be modified. It is then assumed that
since SSH is already working the interface that it's on is sufficient.
e.g.
TASK [subcloud-bnr/restore : Run subcloud222 platform restore playbook] **********
Tuesday 13 December 2022 29:00:91 +0000 (0:00:00.493) 0:00:09.349 ******
fatal: [subcloud222]: FAILED! =>
msg: 'Failed to connect to the host via ssh: ssh: connect to host ffff::1234 port 22: No route to host'
When data is off box registry restore was being triggered by dcmanager even
when not requested. This has been fixed via updating condition.
TEST PLAN
PASS: Optimize restore is successful (AIO-SX)
* Test on affected and unaffected systems
Reviewed: https:/ /review. opendev. org/c/starlingx /ansible- playbooks/ +/867580 /opendev. org/starlingx/ ansible- playbooks/ commit/ b202752c4d0c9e4 8ee86f42d932355 18cda1fdd5
Committed: https:/
Submitter: "Zuul (22348)"
Branch: master
commit b202752c4d0c9e4 8ee86f42d932355 18cda1fdd5
Author: Joshua Kraitberg <email address hidden>
Date: Tue Dec 13 16:28:06 2022 -0500
Rework bring up networking during optimized restore
There were three new issues observed.
It is possible for IPv6 to have multiple default routes.
The existing regex was created for one or none. Replaced
regex with grep to handle none, one, or multiple entries.
e.g.
$ ip -6 route show default
default via ffff::1234 dev enp22s0f1 proto ra metric 1024 expires 1798sec hoplimit 64 pref medium
default via ffff::8888 dev enp22s0f1 proto ra metric 1024 expires 1642sec hoplimit 64 pref medium
dcmanager could timeout if networking takes too long to restart.
The gateway interfaces will no longer be reset. This way the interface
SSH should be on will not be modified. It is then assumed that
since SSH is already working the interface that it's on is sufficient.
e.g. bnr/restore : Run subcloud222 platform restore playbook] **********
TASK [subcloud-
Tuesday 13 December 2022 29:00:91 +0000 (0:00:00.493) 0:00:09.349 ******
fatal: [subcloud222]: FAILED! =>
msg: 'Failed to connect to the host via ssh: ssh: connect to host ffff::1234 port 22: No route to host'
When data is off box registry restore was being triggered by dcmanager even
when not requested. This has been fixed via updating condition.
TEST PLAN
PASS: Optimize restore is successful (AIO-SX)
* Test on affected and unaffected systems
Closes-Bug: 1999585 3708b873a663418 70b810d59bb
Signed-off-by: Joshua Kraitberg <email address hidden>
Change-Id: I029a7e1d01a346