-
Notifications
You must be signed in to change notification settings - Fork 14
Pull KVP on a post request #256
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
Conversation
testinit/docker-compose.yml
Outdated
| volumes: | ||
| - /sys/fs/cgroup:/sys/fs/cgroup:rw | ||
| - /run/dbus/system_bus_socket:/run/dbus/system_bus_socket:rw | ||
| - /tmp:/var/lib/hyperv:rw |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sharing all of /tmp seems a bit excessive for rw, I would probably suggest limiting to a particular directory specific for these tests (emptied prior to test)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like docker supports a tmpfs volume that should be perfect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When checking the Docker tmpfs documentation, it shows a limitation as not being able to share access across containers, as it is only available in one container. The two services here are run in different containers, so this will cause an issue when trying to pull the KVP logs from the mock server. I will update the code to have access to only a single /tmp/testinit/ folder, though, to avoid the braod /tmp/ access.
peytonr18
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!
This PR better mirrors the behavior found on the real Wireserver for pulling KVP that is written to the guest OS.
Previously, the pipeline would output the final KVP file directly from the Azure-init container which contained more information than what would be read in the real POST to Wireserver.
Now, when Azure-init reports ready to the Wireserver, the mock server will access the shared KVP log directly and make a copy, storing it locally. Upon the completion of the pipeline, this copied file is now outputted, giving a more accurate reading of what Wireserver actually sees in the KVP file.
How to use
No usage, this is done automatically by the pipeline during each PR.