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

Remove some cli parameters #320

Merged
merged 6 commits into from
Jan 18, 2023

Conversation

changweige
Copy link
Member

Nydus-snapshotter now has its own toml based configuration file whose entries are duplicated with CLI startup parameters.
In the first phase, we will remove those not frequently used cli parameters and suggest users to migrate the configuration to toml based configuration file.

Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
The default logDir is already decided when filling up
snapshotter's defaults config

Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
This is the second stage for build nydus-snapshotter's own
configuration file

Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
Parpare for making full use of toml based config file.

Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
@changweige changweige force-pushed the remove-more-cli-parameters branch 2 times, most recently from 761c9a6 to 7fd29b7 Compare January 17, 2023 02:32
@codecov-commenter
Copy link

Codecov Report

Base: 30.50% // Head: 29.61% // Decreases project coverage by -0.88% ⚠️

Coverage data is based on head (7fd29b7) compared to base (c84085c).
Patch coverage: 15.38% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #320      +/-   ##
==========================================
- Coverage   30.50%   29.61%   -0.89%     
==========================================
  Files          37       37              
  Lines        3800     3718      -82     
==========================================
- Hits         1159     1101      -58     
+ Misses       2520     2497      -23     
+ Partials      121      120       -1     
Impacted Files Coverage Δ
config/config.go 10.11% <0.00%> (+1.70%) ⬆️
cmd/containerd-nydus-grpc/pkg/command/flags.go 100.00% <100.00%> (ø)
cmd/containerd-nydus-grpc/pkg/logging/setup.go 76.47% <100.00%> (+6.20%) ⬆️
pkg/blob/blob_manager.go 32.65% <0.00%> (+3.06%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@@ -127,31 +93,13 @@ func buildFlags(args *Args) []cli.Flag {
Usage: "whether to enable nydus-overlayfs",
Destination: &args.EnableNydusOverlayFS,
},
&cli.BoolFlag{
Name: "enable-stargz",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does this impact compatibility?

Copy link
Member Author

Choose a reason for hiding this comment

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

I suppose it doesn't. Stargz compatibility does not work for a long time.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Should other flags still be reserved to ensure that snapshotter can be started if users use old flags?

Copy link
Member Author

Choose a reason for hiding this comment

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

I am inclined not to reserve other parameters. We have to migrate to the configuration file pattern in the end.
This PR only removes the parameters that are not likely to be used.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok, we need notice users that this is a breaking change in the release note.

@@ -17,10 +17,7 @@ if [ "$#" -eq 0 ]; then
--root ${NYDUS_LIB} \
--address ${NYDUS_RUN}/containerd-nydus-grpc.sock \
--log-level ${LEVEL} \
--enable-metrics=${ENABLE_METRICS} \
--enable-nydus-overlayfs=${ENABLE_NYDUS_OVERLAY} \
--daemon-mode ${NYDUSD_DAEMON_MODE} \
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we also remove --daemon-mode ? It seems using shared.

Copy link
Member Author

Choose a reason for hiding this comment

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

multiple mode is the default one, so we should keep it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok, just keep --daemon-mode flag and use multiple by default.

Copy link
Member Author

Choose a reason for hiding this comment

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

Let's change the shell variable default value to multiple

Copy link
Member Author

Choose a reason for hiding this comment

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

done

Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
@changweige changweige merged commit 3c56792 into containerd:main Jan 18, 2023
@changweige changweige deleted the remove-more-cli-parameters branch January 18, 2023 01:57
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.

None yet

3 participants