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

Fix kubernetes provider synchronization issues #802

Merged
merged 5 commits into from
Mar 20, 2023

Conversation

serban300
Copy link
Contributor

Fixing some issues that I stumbled upon while working on #796

fn: KubeClient::createResource
arg: waitReady
- We were assessing if the transfer-files-container is ready only by
checking if it's state is "running". While this is necessary, it is not
enough. We need to make sure that it finished initializing (downloading
coreutils). We do this by looking for the "waiting for tar to finish"
line in the logs
- Define a reusable method for retrying actions.
- Wait for the chain to start before trying to copy the chain spec file
- Use wait_log() for getChainSpecRaw()
I stumbled upon a lot of failures when downloading coreutils, after curl
had been downloaded successfully from the same server. Not sure why.
Might be an issue with the wget used in the container. Anyway, not using
https seems to fix the issue.
@serban300 serban300 self-assigned this Mar 18, 2023
@@ -42,7 +43,10 @@ export async function setupChainSpec(
const podName = podDef.metadata.name;
await client.spawnFromDef(podDef);

debug("copy file from pod");
debug("waiting for chain-spec");
await client.waitLog(podName, podName, NODE_CONTAINER_WAIT_LOG);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nice, thanks!!

Copy link
Collaborator

@pepoviola pepoviola left a comment

Choose a reason for hiding this comment

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

Looks good to me, thanks @serban300!!

@serban300
Copy link
Contributor Author

@pepoviola thank you for the review !

@wirednkod would you like to take a look on this PR ? Or could I go ahead and merge it ?

@serban300 serban300 merged commit 70452e6 into paritytech:main Mar 20, 2023
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.

3 participants