Skip to content

Commit

Permalink
Merge pull request ceph#38804 from sebastian-philipp/cephadm-silence-…
Browse files Browse the repository at this point in the history
…evict-container

cephadm: silence "Failed to evict container" log msg

Reviewed-by: Adam King <[email protected]>
  • Loading branch information
sebastian-philipp committed Jan 11, 2021
2 parents 8d80817 + 1bed46e commit 2cd46a1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/cephadm/cephadm
Original file line number Diff line number Diff line change
Expand Up @@ -2393,10 +2393,10 @@ def _write_container_cmd_to_bash(file_obj, container, comment=None, background=F
# unit file, makes it easier to read and grok.
file_obj.write('# ' + comment + '\n')
# Sometimes, adding `--rm` to a run_cmd doesn't work. Let's remove the container manually
file_obj.write('! '+ ' '.join(container.rm_cmd()) + '\n')
file_obj.write('! '+ ' '.join(container.rm_cmd()) + '2> /dev/null\n')
# Sometimes, `podman rm` doesn't find the container. Then you'll have to add `--storage`
if 'podman' in container_path:
file_obj.write('! '+ ' '.join(container.rm_cmd(storage=True)) + '\n')
file_obj.write('! '+ ' '.join(container.rm_cmd(storage=True)) + '2> /dev/null\n')

# container run command
file_obj.write(' '.join(container.run_cmd()) + (' &' if background else '') + '\n')
Expand Down Expand Up @@ -2722,7 +2722,6 @@ Before=ceph-{fsid}.target
LimitNOFILE=1048576
LimitNPROC=1048576
EnvironmentFile=-/etc/environment
ExecStartPre=-{container_path} rm ceph-{fsid}-%i
ExecStart=/bin/bash {data_dir}/{fsid}/%i/unit.run
ExecStop=-{container_path} stop ceph-{fsid}-%i
ExecStopPost=-/bin/bash {data_dir}/{fsid}/%i/unit.poststop
Expand Down

0 comments on commit 2cd46a1

Please sign in to comment.