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

Use zip library to create zip file #61

Closed
wants to merge 1 commit into from

Conversation

arnaud-tincelin
Copy link
Collaborator

No description provided.

Copy link
Member

@Tatsinnit Tatsinnit left a comment

Choose a reason for hiding this comment

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

👍 Thanks for this, I have not tested this yet, but changes look good, especially moving away from running zip shell command and using golang lib.

  • I will test it out, but setting it for approval.

Will wait if anyone else wants to drop their thoughts. Thank you 🙏

Copy link
Member

@Tatsinnit Tatsinnit left a comment

Choose a reason for hiding this comment

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

💡 🐛 I found a bug while testing this, which will be cause because the *.zip file is no longer, due to failure in zipAndExportMode.

Taking a look.

Update

Cool, so reason it will fail is because os.Create( do not handle base dir creation.

pod logs:

2021/06/13 08:53:31 Diagnoser: networkoutbound, diagnose data
2021/06/13 08:53:31 Diagnoser: networkconfig, diagnose data
2021/06/13 08:53:32 Diagnoser: networkconfig, export data
2021/06/13 08:53:32 	append blob file: /aks-periscope/2021-06-13T08-53-01Z/aks-agentpool-20085782-vmss000001/diagnoser/networkconfig, start position: 0, end position: 163
2021/06/13 08:53:32 Diagnoser: networkoutbound, export data
2021/06/13 08:53:32 	append blob file: /aks-periscope/2021-06-13T08-53-01Z/aks-agentpool-20085782-vmss000001/diagnoser/networkoutbound, start position: 0, end position: 839
2021/06/13 08:53:32 Zip and export result files
2021/06/13 08:53:32 Failed to zip and export result files: create zip: file /var/log/aks-periscope/2021-06-13T08-53-01Z/aks-agentpool-20085782-vmss000001/aks-agentpool-20085782-vmss000001.zip cannot be created: open /var/log/aks-periscope/2021-06-13T08-53-01Z/aks-agentpool-20085782-vmss000001/aks-agentpool-20085782-vmss000001.zip: no such file or directory

@Tatsinnit
Copy link
Member

Thanks @arnaud-tincelin , closing this PR as this #65 seems to cover all. Please let me know if we need this PR back. 🙏

@Tatsinnit Tatsinnit closed this Jun 30, 2021
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.

2 participants