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

[BUG] Podman: container name is not respected #270

Closed
MrTomRod opened this issue Sep 26, 2023 · 3 comments
Closed

[BUG] Podman: container name is not respected #270

MrTomRod opened this issue Sep 26, 2023 · 3 comments

Comments

@MrTomRod
Copy link

MrTomRod commented Sep 26, 2023

In pgap.py's make_podman_cmd, the parameter --container-name is only respected if debug is True. The indentation is wrong imo:

    def make_podman_cmd(self):
...
        if self.params.args.debug:
            log_dir = self.params.outputdir + '/debug/log'
            os.makedirs(log_dir, exist_ok=True)
            self.cmd.extend(['--volume', '{}:/log/srv'.format(log_dir)])
            if self.params.args.container_name:
                self.cmd.extend(['--name', self.params.args.container_name])
        self.cmd.append(self.params.docker_image)

Should be:

    def make_podman_cmd(self):
...
        if self.params.args.debug:
            log_dir = self.params.outputdir + '/debug/log'
            os.makedirs(log_dir, exist_ok=True)
            self.cmd.extend(['--volume', '{}:/log/srv'.format(log_dir)])
        if self.params.args.container_name:
            self.cmd.extend(['--name', self.params.args.container_name])
        self.cmd.append(self.params.docker_image)
@azat-badretdin
Copy link
Contributor

Hi, Thomas! Thank you for your report. Have you tried our October/2023 version? We fixed it according to our release notes.

@MrTomRod
Copy link
Author

Yes, it works!

@azat-badretdin
Copy link
Contributor

Excellent! Thanks for confirming, Thomas!

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

No branches or pull requests

2 participants