Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

portusctl: show a warning if the local registry has not been installed #1096

Merged
merged 1 commit into from
Nov 17, 2016

Conversation

mssola
Copy link
Collaborator

@mssola mssola commented Oct 19, 2016

If the admin is using the --local-registry then we can help the admin
to play safer:

  1. If the docker-distribution-registry RPM has not been installed, then
    the user can decide to install it then.
  2. If the RPM exists, then we warn the user about the fact that the
    config will be overwritten and ask for permission to proceed.
  3. All this can be forced by providing the "PORTUSCTL_FORCE" environment
    variable.

Fixes #712

Signed-off-by: Miquel Sabaté Solà [email protected]

# system. If it is, it will simply return true. Otherwise, it will ask the user
# whether or not to install the package first and then proceed. If the user
# doesn't want that, or some zypper command failed, then it returns false. All
# the decissions to be made by the user can be coerced with the environment
Copy link
Contributor

Choose a reason for hiding this comment

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

decisions

Runner.safe_exec("zypper", ["-q", "-n", "--no-gpg-checks", "in", REGISTRY_RPM])
end

# TODO
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this still relevant?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added proper documentation

end

context "PORTUSCTL_FORCE has been set" do
it "returns true of the package already exists" do
Copy link
Contributor

Choose a reason for hiding this comment

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

if

@mssola
Copy link
Collaborator Author

mssola commented Oct 19, 2016

@monstermunchkin fixed

If the admin is using the `--local-registry` then we can help the admin
to play safer:

1. If the docker-distribution-registry RPM has not been installed, then
   the user can decide to install it then.
2. If the RPM exists, then we warn the user about the fact that the
   config will be overwritten and ask for permission to proceed.
3. All this can be forced by providing the "PORTUSCTL_FORCE" environment
   variable.

Fixes SUSE#712

Signed-off-by: Miquel Sabaté Solà <[email protected]>
@mssola mssola merged commit 7fb2497 into SUSE:master Nov 17, 2016
@mssola mssola deleted the portusctl-registry branch November 17, 2016 14:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants