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

test: create directory for certs before copying #4569

Merged
merged 1 commit into from
May 5, 2022

Conversation

dotnwat
Copy link
Member

@dotnwat dotnwat commented May 5, 2022

Cover letter

If the directory in which certs are copied to does not exist then an
error will be thrown. This PR ensure the target directory exists before
copying the cert files.

Fixes: #4552

Testing. I suppose other issues could cause this, but I simulated this scenario by manually manipulating paths and it produced the same error. Further, bootstrap config writing also initializes the target directory suggesting this may have been encountered before.

Release notes

  • none

If the directory in which certs are copied to does not exist then an
error will be thrown. This PR ensure the target directory exists before
copying the cert files.

Fixes: redpanda-data#4552

Signed-off-by: Noah Watkins <noah@redpanda.com>
@dotnwat dotnwat requested a review from NyaliaLui as a code owner May 5, 2022 03:28
@dotnwat
Copy link
Member Author

dotnwat commented May 5, 2022

/backport v22.1.x

@vbotbuildovich
Copy link
Collaborator

The pull request is not merged yet. Cancelling backport...

@abhijat
Copy link
Contributor

abhijat commented May 5, 2022

Was about to ask if we should check if dir exists before creating to avoid an error but it looks like this function uses mkdir -p so should be fine

    def mkdirs(self, path, mode=_DEFAULT_PERMISSIONS):
        self.ssh("mkdir -p %s && chmod %o %s" % (path, mode, path))

@dotnwat dotnwat merged commit 5b46397 into redpanda-data:dev May 5, 2022
@dotnwat
Copy link
Member Author

dotnwat commented May 5, 2022

/backport v22.1.x

This pull request was closed.
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

Successfully merging this pull request may close these issues.

acls_test.AccessControlListTest.test_describe_acls.use_tls=True
4 participants