diff options
author | Tomi Juvonen <tomi.juvonen@nokia.com> | 2018-11-28 11:48:27 +0200 |
---|---|---|
committer | Tomi Juvonen <tomi.juvonen@nokia.com> | 2018-12-18 12:40:53 +0200 |
commit | e6708c869855ab69f9b53959befd82bb2f32f9ad (patch) | |
tree | 549f91d138d0dc796047fbefa70ceef1d467b5f8 /doctor_tests/scenario | |
parent | e1c5dd0158d5168738fcc9918d24c04ca724b056 (diff) |
Bug - Testing in Apex with OpenStack master fails
Support yet another path to find config files.
Tune config changes to take effect properly for maintenance.
transport_url parcing enhanced.
Nova reset state to error takes well over 1 second these days
and at the end it then sends notification that we use.
Only reasonable thing is to send notification straight from
the Inspector as it should have been done in the first place.
Now we can do 200ms as total time, with just a few millisends
actuallly spent on sending the notification. Further one
could improve this by having node specific Inspector agent to
react even in more Telco grade speed.
Change-Id: I787f8e9dd6484842c6c568b15767018d11b36862
Signed-off-by: Tomi Juvonen <tomi.juvonen@nokia.com>
Diffstat (limited to 'doctor_tests/scenario')
-rw-r--r-- | doctor_tests/scenario/fault_management.py | 4 | ||||
-rw-r--r-- | doctor_tests/scenario/maintenance.py | 14 |
2 files changed, 13 insertions, 5 deletions
diff --git a/doctor_tests/scenario/fault_management.py b/doctor_tests/scenario/fault_management.py index 869311bd..a110b88a 100644 --- a/doctor_tests/scenario/fault_management.py +++ b/doctor_tests/scenario/fault_management.py @@ -40,7 +40,7 @@ sleep 1 class FaultManagement(object): - def __init__(self, conf, installer, user, log): + def __init__(self, conf, installer, user, log, transport_url): self.conf = conf self.log = log self.user = user @@ -55,7 +55,7 @@ class FaultManagement(object): self.network = Network(self.conf, log) self.instance = Instance(self.conf, log) self.alarm = Alarm(self.conf, log) - self.inspector = get_inspector(self.conf, log) + self.inspector = get_inspector(self.conf, log, transport_url) self.monitor = get_monitor(self.conf, self.inspector.get_inspector_url(), log) diff --git a/doctor_tests/scenario/maintenance.py b/doctor_tests/scenario/maintenance.py index 09795c2a..a2129f61 100644 --- a/doctor_tests/scenario/maintenance.py +++ b/doctor_tests/scenario/maintenance.py @@ -40,7 +40,7 @@ class Maintenance(object): else: self.endpoint = 'v1/maintenance' self.app_manager = get_app_manager(self.stack, self.conf, self.log) - self.inspector = get_inspector(self.conf, self.log) + self.inspector = get_inspector(self.conf, self.log, trasport_url) def get_external_network(self): ext_net = None @@ -68,8 +68,16 @@ class Maintenance(object): raise Exception('not enough vcpus (%d) on %s' % (vcpus, hostname)) if vcpus_used > 0: - raise Exception('%d vcpus used on %s' - % (vcpus_used, hostname)) + if self.conf.test_case == 'all': + # VCPU might not yet be free after fault_management test + self.log.info('%d vcpus used on %s, retry...' + % (vcpus_used, hostname)) + time.sleep(15) + hvisor = self.nova.hypervisors.get(hvisor.id) + vcpus_used = hvisor.__getattr__('vcpus_used') + if vcpus_used > 0: + raise Exception('%d vcpus used on %s' + % (vcpus_used, hostname)) if prev_vcpus != 0 and prev_vcpus != vcpus: raise Exception('%d vcpus on %s does not match to' '%d on %s' |