This repository was archived by the owner on May 27, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 59
add -q
/--quiet
to ch-image
#1636
Merged
Merged
Changes from all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
a894feb
add \-\-quiet to ch-image
lucaudill 7ff1065
add --quiet to ch-run
lucaudill 1f03ea5
start adding multiple levels of --quiet [skip ci]
lucaudill fae4096
debugging [skip ci]
lucaudill 0cf839b
ugghh
lucaudill 57df5d7
more junk, getting closer
lucaudill f94d3d0
more progress
lucaudill ee97310
nvm about ch-run actually
lucaudill 4eafc9e
add documentation, implement a bit
lucaudill e2fb0dd
fix ch-run-oci, remove unneccessary (?) change
lucaudill 315b6ce
update gestalt
lucaudill 67e8b40
add test
lucaudill a033dbb
change some things, fix a test
lucaudill 1e3387b
Merge branch 'master' into add-quiet_1613
lucaudill 836eda7
add new opt to completion script
lucaudill dcd3ee1
make sane
lucaudill 6418183
Update bin/ch-image.py.in [skip ci]
lucaudill 6f1cb22
Update bin/ch-image.py.in [skip ci]
lucaudill 345935f
Update test/build/50_ch-image.bats [skip ci]
lucaudill d52fb8b
Update doc/ch-image.rst [skip ci]
lucaudill 6a4f763
update help, add enum
lucaudill 96d8e62
Merge branch 'master' into add-quiet_1613
lucaudill 6568e2a
Merge branch 'add-quiet_1613' of github.com:hpc/charliecloud into add…
lucaudill 3266e25
remove whitespace
lucaudill 3cc973f
summary table per discussion [skip ci]
reidpr af79212
Merge branch 'master' into add-quiet_1613
lucaudill f637dfc
more enum stuff [skip ci]
lucaudill 8fbebde
finish enum stuff
lucaudill 812535e
fix a bug
lucaudill 89e0a4e
Merge branch 'master' into add-quiet_1613
lucaudill 1b2eea2
trailing whitespace
lucaudill f7939f6
update test
lucaudill 186cde9
fix a test
lucaudill 2faffe7
even more suggestions
lucaudill 1635a55
Update doc/ch-image.rst [skip ci]
lucaudill 030234a
Update doc/faq.rst [skip ci]
lucaudill f7263be
more suggestions
lucaudill 37b87e1
Merge branch 'add-quiet_1613' of github.com:hpc/charliecloud into add…
lucaudill f851ec1
more suggestions
lucaudill 0fc4783
disable cache for test
lucaudill 157342a
tidy
reidpr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
8000
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -394,8 +394,6 @@ of the default 1001:1001), i.e. :code:`--gid=5`. Then, step 4 succeeds because | |
the call is mapped to :code:`chown("/dev/pts/0", 1000, 1001)` and MATLAB is | ||
happy. | ||
|
||
.. _faq_docker2tar-size: | ||
|
||
:code:`ch-convert` from Docker incorrect image sizes | ||
---------------------------------------------------- | ||
|
||
|
@@ -1031,7 +1029,6 @@ One fix is to configure your :code:`.bashrc` or equivalent to: | |
fi | ||
} | ||
|
||
|
||
How can I build images for a foreign architecture? | ||
-------------------------------------------------- | ||
|
||
|
@@ -1079,7 +1076,6 @@ install :code:`qemu-*-static`, is to populate a chroot for it with the `PRoot | |
specifying a :code:`qemu-*-static` binary (perhaps obtained by unpacking a | ||
distribution package). | ||
|
||
|
||
How can I use tarball base images from e.g. linuxcontainers.org? | ||
---------------------------------------------------------------- | ||
|
||
|
@@ -1098,6 +1094,157 @@ linuxcontainers.org uses the opposite order for “le” in the architecture nam | |
$ wget https://uk.lxd.images.canonical.com/images/alpine/3.15/ppc64el/default/20220304_13:00/rootfs.tar.xz | ||
$ ch-image import rootfs.tar.xz ppc64le/alpine:3.17 | ||
|
||
.. _faq_verbosity: | ||
|
||
How can I control Charliecloud’s quietness or verbosity? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Say something about Charliecloud's own stdout in this section? |
||
-------------------------------------------------------- | ||
|
||
Charliecloud logs various chatter about what is going on to standard error. | ||
This is distinct from *output*, e.g., :code:`ch-image list` prints the list of | ||
images to standard output. We use reasonably standard log levels: | ||
|
||
1. **Error**. Some error condition that makes it impossible to proceed. The | ||
program exits soon after printing the error. Examples: unknown image | ||
type, Dockerfile parse error. (There is an internal distinction between | ||
“fatal” and “error” levels, but this isn’t really meaningful to users.) | ||
|
||
2. **Warning**. Unexpected condition the user needs to know about but that | ||
should not stop the program. Examples: :code:`ch-run --mount` with a | ||
directory image (which does not use a mount point), unsupported | ||
Dockerfile instructions that are ignored. | ||
|
||
3. **Info**. Chatter useful enough to be printed by default. Example: | ||
progress messages during image download and unpacking. (:code:`ch-run` is | ||
silent during normal operations and does not have any “info” logging.) | ||
|
||
4. **Verbose**. Diagnostic information useful for debugging user containers, | ||
the Charliecloud installation, and Charliecloud itself. Examples: | ||
:code:`ch-run --join` coordination progress, :code:`ch-image` internal | ||
paths, Dockerfile parse tree. | ||
|
||
5. **Debug**. More detailed diagnostic information useful for debugging | ||
Charliecloud. Examples: data structures unserialized from image registry | ||
metadata JSON, image reference parse tree. | ||
|
||
6. **Trace**; printed if :code:`-vvv`. Grotesquely detailed diagnostic | ||
information for debugging Charliecloud, to the extent it interferes with | ||
normal use. A sensible person might use a `debugger | ||
<https://twitter.com/wesamo__/status/1464764461831663626>`_ instead. | ||
Examples: component-by-component progress of bind-mount target directory | ||
analysis/creation, text of image registry JSON, every single file | ||
unpacked from image layers. | ||
|
||
Charliecloud also runs sub-programs at various times, notably commands in | ||
:code:`RUN` instructions and :code:`git(1)` to manage the build cache. These | ||
programs have their own standard error and standard output streams, which | ||
Charliecloud either suppresses or passes through depending on verbosity level. | ||
|
||
Most Charliecloud programs accept :code:`-v` to increase logging verbosity and | ||
:code:`-q` to decrease it. Generally: | ||
|
||
* Each :code:`-v` (up to three) makes Charliecloud noisier. | ||
|
||
* :code:`-q` suppresses normal logging. | ||
|
||
* :code:`-qq` also suppresses stdout for the program and its subprocesses, | ||
and warnings from the program. | ||
|
||
* :code:`-qqq` also suppresses subprocess stderr. (This means subprocesses | ||
are completely silenced no matter what goes wrong!) | ||
|
||
This table list which logging is printed at which verbosity levels (✅ | ||
indicates printed, ❌ suppressed). | ||
|
||
.. list-table:: | ||
:header-rows: 1 | ||
|
||
* - | ||
- :code:`-vvv` | ||
- :code:`-vv` | ||
- :code:`-v` | ||
- def. | ||
- :code:`-q` | ||
- :code:`-qq` | ||
- :code:`-qqq` | ||
* - trace | ||
- ✅ | ||
- ❌ | ||
- ❌ | ||
- ❌ | ||
- ❌ | ||
- ❌ | ||
- ❌ | ||
* - debug | ||
- ✅ | ||
- ✅ | ||
- ❌ | ||
- ❌ | ||
- ❌ | ||
- ❌ | ||
- ❌ | ||
* - verbose | ||
- ✅ | ||
- ✅ | ||
- ✅ | ||
- ❌ | ||
- ❌ | ||
- ❌ | ||
- ❌ | ||
* - info | ||
- ✅ | ||
- ✅ | ||
- ✅ | ||
- ✅ | ||
- ❌ | ||
- ❌ | ||
- ❌ | ||
* - program stdout | ||
- ✅ | ||
- ✅ | ||
- [1] | ||
- [1] | ||
- [1] | ||
- ❌ | ||
- ❌ | ||
* - subprocess stdout | ||
- ✅ | ||
- ✅ | ||
- [1] | ||
- [1] | ||
- [1] | ||
- ❌ | ||
- ❌ | ||
* - warning | ||
- ✅ | ||
- ✅ | ||
- ✅ | ||
- ✅ | ||
- ✅ | ||
- ❌ | ||
- ❌ | ||
* - subprocess stderr | ||
- ✅ | ||
- ✅ | ||
- ✅ | ||
- ✅ | ||
- ✅ | ||
- ✅ | ||
- ❌ | ||
* - error | ||
- ✅ | ||
- ✅ | ||
- ✅ | ||
- ✅ | ||
- ✅ | ||
- ✅ | ||
- ✅ | ||
|
||
Notes: | ||
|
||
1. Charliecloud handles subprocess stdout on case-by-case basis for these log | ||
levels. For example, sometimes it’s passed through by default (e.g., | ||
:code:`RUN`) and sometimes it’s captured for internal use (e.g., many | ||
:code:`git(1)` invocations). | ||
|
||
.. LocalWords: CAs SY Gutmann AUTH rHsFFqwwqh MrieaQ Za loc mpihello mvo du | ||
.. LocalWords: VirtualSize linuxcontainers jour uk lxd rwxr xr | ||
.. LocalWords: VirtualSize linuxcontainers jour uk lxd rwxr xr qq qqq |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I wonder if we should revisit the
--debug
incompatibility? It seems orthogonal now.Also
--debug
seems to be undocumented here.