-
Notifications
You must be signed in to change notification settings - Fork 237
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
[WIP] Print JSON status of preflight checks #2984
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: anjannath The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Please ignore the CI failure for now, is related to |
1b37889
to
4f3a33a
Compare
Steps need to be identified by a number, especially a list of all these steps by name. |
right now for every check/step this is the information that we get, you want an {
"type": "check",
"description": "Checking if current user is in Hyper-V Admins group",
"result": "passed",
"error": null
} for the download, we get the total size and the currently downloaded size, which can be used for the progress bar on the tray. can you provide example of what should be the JSON o/p for |
something like:
|
the idea is to use this structured o/p of preflight checks in the tray to show details to the user since our logging package writes to stderr only, if we only read stdout from the setup command while running in the tray then we get valid json
like the previous commit, this also prints the json o/p on stdout
@gbraad this is the updated o/p, not yet able to relate the download stats with the preflight check id, also in the code fix is part of the check struct, so even though the
|
Changing this to be newline delimited and add more information to the actual download message: {"total": 26}
{"id":1,"type":"check","description":"Checking if running as non-root","result":"passed","error":null}
{"id":2,"type":"check","description":"Checking if running inside WSL2","result":"passed","error":null}
{"id":3,"type":"check","description":"Checking if crc-admin-helper executable is cached","result":"passed","error":null}
{"id":4,"type":"check","description":"Checking for obsolete admin-helper executable","result":"passed","error":null}
{"id":5,"type":"check","description":"Checking if running on a supported CPU architecture","result":"passed","error":null}
{"id":6,"type":"check","description":"Checking minimum RAM requirements","result":"passed","error":null}
{"id":7,"type":"check","description":"Checking if crc executable symlink exists","result":"passed","error":null}
{"id":8,"type":"check","description":"Checking if Virtualization is enabled","result":"passed","error":null}
{"id":9,"type":"check","description":"Checking if KVM is enabled","result":"passed","error":null}
{"id":10,"type":"check","description":"Checking if libvirt is installed","result":"passed","error":null}
{"id":11,"type":"check","description":"Checking if user is part of libvirt group","result":"passed","error":null}
{"id":12,"type":"check","description":"Checking if active user/process is currently part of the libvirt group","result":"passed","error":null}
{"id":13,"type":"check","description":"Checking if libvirt daemon is running","result":"passed","error":null}
{"id":14,"type":"check","description":"Checking if a supported libvirt version is installed","result":"passed","error":null}
{"id":15,"type":"check","description":"Checking if crc-driver-libvirt is installed","result":"passed","error":null}
{"id":16,"type":"check","description":"Checking crc daemon systemd service","result":"passed","error":null}
{"id":17,"type":"check","description":"Checking crc daemon systemd socket units","result":"passed","error":null}
{"id":18,"type":"check","description":"Checking if systemd-networkd is running","result":"passed","error":null}
{"id":19,"type":"check","description":"Checking if NetworkManager is installed","result":"passed","error":null}
{"id":20,"type":"check","description":"Checking if NetworkManager service is running","result":"passed","error":null}
{"id":21,"type":"check","description":"Checking if dnsmasq configurations file exist for NetworkManager","result":"passed","error":null}
{"id":22,"type":"check","description":"Checking if the systemd-resolved service is running","result":"passed","error":null}
{"id":23,"type":"check","description":"Checking if /etc/NetworkManager/dispatcher.d/99-crc.sh exists","result":"passed","error":null}
{"id":24,"type":"check","description":"Checking if libvirt 'crc' network is available","result":"passed","error":null}
{"id":25,"type":"check","description":"Checking if libvirt 'crc' network is active","result":"passed","error":null}
{"id":26,"type":"check","description":"Checking if CRC bundle is extracted in '$HOME/.crc'","result":"failed","error":{}}
{"type":"download","filename":"/home/gbraad/.crc/cache/crc_podman_libvirt_3.4.4.crcbundle","totalBytes":649600569,"completedBytes":7437096}
{"type":"download","filename":"/home/gbraad/.crc/cache/crc_podman_libvirt_3.4.4.crcbundle","totalBytes":649600569,"completedBytes":33323816}
{"type":"download","filename":"/home/gbraad/.crc/cache/crc_podman_libvirt_3.4.4.crcbundle","totalBytes":649600569,"completedBytes":58620712}
{"type":"download","filename":"/home/gbraad/.crc/cache/crc_podman_libvirt_3.4.4.crcbundle","totalBytes":649600569,"completedBytes":84769576} |
Ideally this needs the step streamed BEFORE the result is known, and followed by the actual state is finished (passed/failed) |
@anjannath: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Fixes #2935
This is based on the initial changes done by @cfergeau at cfergeau@447677b