Skip to content

Commit

Permalink
Merge PR ceph#39003 into master
Browse files Browse the repository at this point in the history
* refs/pull/39003/head:
	cephadm: fix 2> syntax in unit.run

Reviewed-by: Michael Fritch <[email protected]>
Reviewed-by: Sebastian Wagner <[email protected]>
Reviewed-by: Dimitri Savineau <[email protected]>
  • Loading branch information
liewegas committed Jan 22, 2021
2 parents 8db0dc8 + ce4743f commit 3d7761b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cephadm/cephadm
Original file line number Diff line number Diff line change
Expand Up @@ -2505,10 +2505,10 @@ def _write_container_cmd_to_bash(ctx, file_obj, container, comment=None, backgro
# 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()) + '2> /dev/null\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 ctx.container_path:
file_obj.write('! '+ ' '.join(container.rm_cmd(storage=True)) + '2> /dev/null\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

0 comments on commit 3d7761b

Please sign in to comment.