Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mgr/cephadm: check if a service exists before trying to restart it #46444

Merged
merged 1 commit into from Jun 2, 2022

Conversation

rkachach
Copy link
Contributor

With the fix:

ceph: root@ceph-node-0 /]# ceph orch restart keepalived.nfs.foo.ceph-node-0.imygkp
Error EINVAL: Invalid service name "keepalived.nfs.foo.ceph-node-0.imygkp". View currently running services using "ceph orch ls"

Fixes: https://tracker.ceph.com/issues/55800
Signed-off-by: Redouane Kachach rkachach@redhat.com

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

@rkachach rkachach requested a review from a team as a code owner May 31, 2022 10:16
@@ -1890,6 +1890,9 @@ def list_daemons(self,

@handle_orch_error
def service_action(self, action: str, service_name: str) -> List[str]:
if service_name not in self.spec_store.all_specs.keys():
raise OrchestratorError(f'Invalid service name "{service_name}".'
+ ' View currently running services using "ceph orch ls"')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+ ' View currently running services using "ceph orch ls"')
+ ' View currently running services using `ceph orch ls`')

(nit) should we use markdown instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering what's the benefit of using markdown here. This message would be output in the console.

@adk3798
Copy link
Contributor

adk3798 commented Jun 2, 2022

https://pulpito.ceph.com/adking-2022-06-02_01:28:06-orch:cephadm-wip-adk-testing-2022-06-01-1756-distro-default-smithi/

1 infra/teuthology failure:

{'smithi039.front.sepia.ceph.com': {'_ansible_no_log': False, 'attempts': 24, 'changed': False, 'invocation': {'module_args': {'allow_unauthenticated': False, 'autoclean': False, 'autoremove': False, 'cache_valid_time': 0, 'deb': None, 'default_release': None, 'dpkg_options': 'force-confdef,force-confold', 'force': False, 'force_apt_get': False, 'install_recommends': None, 'only_upgrade': False, 'package': None, 'policy_rc_d': None, 'purge': False, 'state': 'present', 'update_cache': True, 'update_cache_retries': 5, 'update_cache_retry_max_delay': 12, 'upgrade': None}}, 'msg': 'Failed to update apt cache: unknown reason'}}

from before the test actually started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants