Closed vyasgun closed 3 months ago
/retest
it is showing the value of the persistent-volume-size
config option, but it'd be more useful if the usage was shown like the Disk Usage
(how much is used and how much is free)
e.g
CRC VM: Running
OpenShift: Running (v4.16.0)
RAM Usage: 6.374GB of 10.92GB
Disk Usage: 22.86GB of 32.68GB (Inside the CRC VM)
Persistent Volume Usage: 7GB of 15GB
Cache Usage: 64.58GB
Cache Directory: /home/anjan/.crc/cache
also this should be shown only when using the microshift
preset for now, since for openshift
preset the config doesn't have any effect yet
% crc config get preset
Configuration property 'preset' is not set. Default value 'openshift' is used
% crc status
CRC VM: Running
OpenShift: Running (v4.16.0)
RAM Usage: 6.374GB of 10.92GB
Disk Usage: 22.86GB of 32.68GB (Inside the CRC VM)
Persistent Volume Size: 15GB
Cache Usage: 64.58GB
Cache Directory: /home/anjan/.crc/cache
@anjannath Just updated the code. Please take a look again, thanks!
@vyasgun: The following tests failed, say /retest
to rerun all failed tests or /retest-required
to rerun all mandatory failed tests:
Test name | Commit | Details | Required | Rerun command |
---|---|---|---|---|
ci/prow/security | 944a250899b659b2ab9c5f9d3b7641b914fc064a | link | false | /test security |
ci/prow/integration-crc | 944a250899b659b2ab9c5f9d3b7641b914fc064a | link | true | /test integration-crc |
Full PR test history. Your PR dashboard.
@vyasgun one thing i forgot to mention earlier is that the response for /status
from the daemon API also needs to be updated to include the persistent volume size
The /status
changes are there: https://github.com/crc-org/crc/pull/4265/files#diff-33aaddc3c8c7beec8f2bd2c494769cf4d50dafc32852da086948ad308127d19bR73
gvyas-mac:~ gvyas$ curl --unix-socket /Users/gvyas/.crc/crc-http.sock http://127.0.0.1/api/status
{"CrcStatus":"Running","OpenshiftStatus":"Running","OpenshiftVersion":"4.15.12","DiskUse":5831663616,"DiskSize":24702353408,"RAMUse":2200383488,"RAMSize":3904045056,"PersistentVolumeUse":10670309377,"PersistentVolumeSize":16000000000,"Preset":"microshift"}
@anjannath -- let me know if anything else needs to be added!
[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
Enhance the crc status command to display the PersistentVolumeSize from the CRC configuration.
Fixes: Issue #4191
Solution/Idea
The
/status
handler should return fields specifying the PVC size and usage (allocated storage).Proposed changes
Testing
Run
crc status