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: Adding image tag and date to cephadm startup messages #45598

Merged
merged 2 commits into from Apr 26, 2022

Conversation

rkachach
Copy link
Contributor

@rkachach rkachach commented Mar 23, 2022

This PR has two goals:

  • Ensure the image used by cephadm shell is in sync with any ceph daemon (mon, mgr, osd, etc) running on the local host
  • Show more information to the user to make him aware which image cephadm shell has chosen

The first point will help to fix the version mismatch issues reported in several trackers (specially after upgrade scenarios). Meanwhile the second point is an improvement of the current info shown to the user.

Previously when cephadm is launched we print something like:

[root@ceph-node-0 ~]# cephadm shell
Inferring fsid d71c2bbe-aabb-11ec-8403-52540052aca1
Using recent ceph image registry.hub.docker.com/rkachach/ceph@sha256:565277a8bcb13d2e123d444c4e5433cd28b221ec48fb97d99e4fcaae2233cf38

With the changes now it shows:

[root@ceph-node-0 ~]# cephadm shell
Inferring fsid f8e22d2c-bfd1-11ec-ad4a-525400120be8
Using ceph image with id '666bbfa87e8d' and tag 'custom-v0.5' created on 2022-02-02 12:03:03 +0000 UTC
registry.hub.docker.com/rkachach/ceph@sha256:1cb40d8f783f9725b67a1db97e615f4ff4355467fe3b793d489d33d562460ee8

Basically we add the fields id '666bbfa87e8d', tag 'v15.2.5' and created on 2020-09-16 14:15:15 +0000 UTC
show both tag and creation date this way it's easier to know which image cephadm is using.

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

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 March 23, 2022 17:31
@rkachach rkachach force-pushed the fix_issue_55008 branch 2 times, most recently from d67424c to 97fbab6 Compare March 28, 2022 14:19
@rkachach
Copy link
Contributor Author

jenkins test make check

@rkachach
Copy link
Contributor Author

rkachach commented Apr 5, 2022

http://pulpito.ceph.com/adking-2022-04-01_16:41:38-orch:cephadm-wip-adk-testing-2022-04-01-0813-distro-basic-smithi/

1 failure caused by https://tracker.ceph.com/issues/49287

This issue is caused by an old version of runc (1.0.0). I have already commented this with David but he has not updated the OS version of the tests node yet.

@adk3798
Copy link
Contributor

adk3798 commented Apr 11, 2022

http://pulpito.front.sepia.ceph.com/adking-2022-04-08_22:17:12-orch:cephadm-wip-adk-testing-2022-04-08-1434-distro-basic-smithi/

2 failures:

1 caused by https://tracker.ceph.com/issues/49287
workunits/cephadm/test_cephadm.sh failure caused by another PR in this run.

@adk3798
Copy link
Contributor

adk3798 commented Apr 13, 2022

http://pulpito.ceph.com/adking-2022-04-13_05:16:48-orch:cephadm-wip-adk-testing-2022-04-12-2231-distro-basic-smithi/

2 Failures

To summarize, run was passing. Will start tracking this type of lvm batch failure to see if it happens on the same hosts (which would imply a possible hardware issue) in https://tracker.ceph.com/issues/55319

if image and not image.isspace():
(digest, tag, created_date) = image.lstrip().split('|')
if digest and not digest.endswith('@'):
logger.info(f"Using ceph image with tag '{tag}' created on {created_date}\n{digest}")
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe the container image id would be more useful than then the creation time?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the PR to add the image_id plus other important enhancements.

@adk3798
Copy link
Contributor

adk3798 commented Apr 15, 2022

Copy link
Contributor

@phlogistonjohn phlogistonjohn left a comment

Choose a reason for hiding this comment

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

Code looks OK to me, although I do find the unit test a tad confusing. I have no strong opinion about including the creation time.

src/cephadm/cephadm Outdated Show resolved Hide resolved
src/cephadm/cephadm Outdated Show resolved Hide resolved
src/cephadm/cephadm Outdated Show resolved Hide resolved
src/cephadm/tests/test_cephadm.py Outdated Show resolved Hide resolved
src/cephadm/cephadm Outdated Show resolved Hide resolved
@rkachach rkachach requested a review from adk3798 April 20, 2022 10:00
Copy link
Contributor

@adk3798 adk3798 left a comment

Choose a reason for hiding this comment

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

I think this functionally works. Mostly just comments on tests, code comments, etc.

src/cephadm/cephadm Outdated Show resolved Hide resolved
src/cephadm/cephadm Outdated Show resolved Hide resolved
src/cephadm/cephadm Outdated Show resolved Hide resolved
src/cephadm/tests/test_cephadm.py Outdated Show resolved Hide resolved
src/cephadm/tests/test_cephadm.py Show resolved Hide resolved
src/cephadm/tests/test_cephadm.py Outdated Show resolved Hide resolved
src/cephadm/tests/test_cephadm.py Show resolved Hide resolved
src/cephadm/tests/test_cephadm.py Show resolved Hide resolved
src/cephadm/cephadm Outdated Show resolved Hide resolved
Copy link
Contributor

@phlogistonjohn phlogistonjohn left a comment

Choose a reason for hiding this comment

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

A few minor things mostly but I am concerned with the change to the eq behavior. Also, minor but the fixes in the 2nd patch should probably be squashed into the 1st patch. Otherwise the patch history will be a bit messy.

src/cephadm/cephadm Show resolved Hide resolved
src/cephadm/cephadm Show resolved Hide resolved
src/cephadm/cephadm Outdated Show resolved Hide resolved
src/cephadm/cephadm Outdated Show resolved Hide resolved
src/cephadm/cephadm Outdated Show resolved Hide resolved
src/cephadm/cephadm Show resolved Hide resolved
src/cephadm/cephadm Outdated Show resolved Hide resolved
src/cephadm/cephadm Outdated Show resolved Hide resolved
Copy link
Contributor

@adk3798 adk3798 left a comment

Choose a reason for hiding this comment

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

LGTM

src/cephadm/cephadm Outdated Show resolved Hide resolved
…podman

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
@rkachach
Copy link
Contributor Author

jenkins test make check

@adk3798
Copy link
Contributor

adk3798 commented Apr 26, 2022

@adk3798 adk3798 merged commit 11fde33 into ceph:master Apr 26, 2022
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants