diff --git a/releasenotes/notes/ignore-start-if-running-c9a8f6c0514624a1.yaml b/releasenotes/notes/ignore-start-if-running-c9a8f6c0514624a1.yaml new file mode 100644 index 0000000..d6004c2 --- /dev/null +++ b/releasenotes/notes/ignore-start-if-running-c9a8f6c0514624a1.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + Ignores instance "start" command if instance appears to be running. This + helps preserving backward-compatible behaviour, as previous implementation + has required the user to explicitly "start" enabled instances. With current + virtualbmc, only the master process needs to be started. diff --git a/virtualbmc/manager.py b/virtualbmc/manager.py index 974a081..0994562 100644 --- a/virtualbmc/manager.py +++ b/virtualbmc/manager.py @@ -286,8 +286,14 @@ class VirtualBMCManager(object): return 1, str(ex) if domain_name in self._running_domains: - return 1, ('BMC instance %(domain)s ' - 'already running' % {'domain': domain_name}) + + self._sync_vbmc_states() + + if domain_name in self._running_domains: + LOG.warning( + 'BMC instance %(domain)s already running, ignoring ' + '"start" command' % {'domain': domain_name}) + return 0, '' try: self._vbmc_enabled(domain_name,