Skip to content

cephadm: Manually remove containers#35018

Merged
sebastian-philipp merged 1 commit intoceph:masterfrom
sebastian-philipp:cephadm-rm-container
Jun 4, 2020
Merged

cephadm: Manually remove containers#35018
sebastian-philipp merged 1 commit intoceph:masterfrom
sebastian-philipp:cephadm-rm-container

Conversation

@sebastian-philipp
Copy link
Contributor

This fixes:

Error: error creating container storage: the container name "ceph-<fsid>-mon.b" is already in use by "<container-id>". You have to remove that container to be able to reuse that name.: that name is already in use

Relates to https://tracker.ceph.com/issues/44990

Signed-off-by: Sebastian Wagner sebastian.wagner@suse.com

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

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 backend
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

@sebastian-philipp
Copy link
Contributor Author

jenkins test make check

@sebastian-philipp
Copy link
Contributor Author

cephadm:1857: error: Too few arguments for "rm_cmd"
cephadm:2183: error: Type signature has too few arguments

This fixes:
```
Error: error creating container storage: the container name "ceph-<fsid>-mon.b" is already in use by "<container-id>". You have to remove that container to be able to reuse that name.: that name is already in use
```

Relates to https://tracker.ceph.com/issues/44990

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
install_path = find_program('install')
f.write('{install_path} -d -m0770 -o {uid} -g {gid} /var/run/ceph/{fsid}\n'.format(install_path=install_path, fsid=fsid, uid=uid, gid=gid))

# Sometimes, adding `--rm` to a run_cmd doesn't work. Let's remove the container manually
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we know why this sometimes doesn't work? It doesn't feel like we've identified the root cause here ..

Copy link
Contributor Author

Choose a reason for hiding this comment

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

which is correct, yes. Looks like podman doesn't honor --rm, if the container creation itself failed. This is a workaround for the broken --rm handling.

However, this doesn't solve, why w're getting a ceph-mon: no such file or directory.

Copy link
Contributor

Choose a reason for hiding this comment

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

@mgfritch @sebastian-philipp we also suffered from some issues in older releases of podman and fuse-overlay but they were addressed in newer releases. see https://tracker.ceph.com/issues/44242 , ceph/ceph-container@c44202c and ceph/ceph-container@6285bae . i think our CI (ceph-build and ceph-container) has got them addressed by installing the latest build of podman and its dependencies.

i am wondering if we should do the same in our testing harness as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hm. you're sure this is related?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

related, sage closed #33367 a while ago without merging it.

Copy link
Contributor

@tchaikov tchaikov Jun 4, 2020

Choose a reason for hiding this comment

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

i am not sure. i just want to rule out whatever issues related to podman and its dependencies. if i am sure, i would put the analysis here. but i am not familiar with podman or docker at this moment, so this is what i can do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

my idea is to just merge this one and see if it helps.

@sebastian-philipp sebastian-philipp added the wip-swagner-testing My Teuthology tests label May 15, 2020
@sebastian-philipp
Copy link
Contributor Author

http://pulpito.ceph.com/swagner-2020-05-15_11:43:55-rados-wip-swagner-testing-2020-05-15-1102-distro-basic-smithi/ failed to verify this: no occurence of "/usr/bin/ceph-mon": stat /usr/bin/ceph-mon: no such file or directory

@sebastian-philipp
Copy link
Contributor Author

http://pulpito.ceph.com/swagner-2020-05-18_08:24:15-rados-wip-swagner-testing-2020-05-15-2348-distro-basic-smithi/

/a/swagner-2020-05-18_08:24:15-rados-wip-swagner-testing-2020-05-15-2348-distro-basic-smithi$ for d in *; do  echo  $d; grep --recursive 'stat /usr/bin/ceph-mon' $d; done
(no results)

@sebastian-philipp
Copy link
Contributor Author

sebastian-philipp commented May 18, 2020

next opportunity: http://pulpito.ceph.com:80/swagner-2020-05-18_13:07:20-rados-wip-swagner2-testing-2020-05-18-1100-distro-basic-smithi/

swagner@teuthology:/a/swagner-2020-05-18_13:07:20-rados-wip-swagner2-testing-2020-05-18-1100-distro-basic-smithi$ for d in *; do  echo  $d; grep --recursive 'stat /usr/bin/ceph-mon' $d; done
(no output)

@sebastian-philipp
Copy link
Contributor Author

/a/swagner-2020-05-20_14:14:11-rados:cephadm-wip-swagner2-testing-2020-05-20-1008-distro-basic-smithi$ for d in *; do  echo  $d; grep --recursive 'container_linux' $d; done
(no output)

@sebastian-philipp
Copy link
Contributor Author

/a/swagner-2020-05-27_10:06:46-rados:cephadm-wip-swagner-testing-2020-05-27-0937-distro-basic-smithi$ for d in *; do  echo  $d; grep --recursive 'container_linux' $d; done
(no output)

@sebastian-philipp
Copy link
Contributor Author

sigh. no clue if this actually works or not.

@sebastian-philipp
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants