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

Issue #116 Show banner when installing packages using yum #119

Merged
merged 1 commit into from
Jul 26, 2017

Conversation

gbraad
Copy link
Member

@gbraad gbraad commented Jul 19, 2017

Deals with #116

  • It shows unsupported when trying to install
  • Waits for confirmation before executing the actual yum command
  • Allows confirmation to be overwritten by using -y in the command

Note:
Banner might need to be more prominent...

@gbraad
Copy link
Member Author

gbraad commented Jul 19, 2017

@praveenkumar livecd-creator seems to interpret the $@ and $answer, and writes "" to the livecd filesystem.

@gbraad gbraad force-pushed the yum-unsupported branch from 38779f4 to 656ce5d Compare July 19, 2017 06:12
@gbraad gbraad force-pushed the yum-unsupported branch 8 times, most recently from 549c29f to b6432fb Compare July 19, 2017 12:10
@@ -1,6 +1,7 @@
BUILD_DIR=$(shell pwd)/build
BIN_DIR=$(BUILD_DIR)/bin
HANDLE_USER_DATA=$(shell base64 -w 0 scripts/handle-user-data)
YUM_WRAPPER=$(shell base64 -w 0 scripts/yum-wrapper)
Copy link
Collaborator

Choose a reason for hiding this comment

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

https://github.com/minishift/minishift-centos-iso/blob/master/Makefile#L40-L41 also need to be updated to pass it to kickstart file.

Copy link
Member Author

Choose a reason for hiding this comment

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

ah, was wondering about this... wondered if livecd-creator created environment variables to be lowercase. awfully distracted at the moment... :-s

@gbraad gbraad force-pushed the yum-unsupported branch 8 times, most recently from 25506a2 to 53b6b01 Compare July 20, 2017 01:49
@gbraad gbraad changed the title WIP Show banner when installing packages using yum Issue #116 Show banner when installing packages using yum Jul 20, 2017
@praveenkumar
Copy link
Collaborator

@gbraad we need to make change to rhel template also because we want this for RHEL iso too right?

@gbraad
Copy link
Member Author

gbraad commented Jul 20, 2017

I would like to, but can not make this call. As I remember developer tools do not follow the same support anyways. /cc: @LalatenduMohanty

@gbraad gbraad force-pushed the yum-unsupported branch from 53b6b01 to d4d252a Compare July 20, 2017 04:25
@LalatenduMohanty
Copy link
Member

@gbraad @praveenkumar Agree, we need to change RHEL ISO also.

@@ -0,0 +1,11 @@
#!/bin/sh
echo "Installing additional packages is not supported. Continue [y/n]"
Copy link
Member

Choose a reason for hiding this comment

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

I think we need to add more information around this e.g. Installing additional packages is not supported because the way the VM is created. The recommended method is to run applications as containers.

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 hope we can refer to a document or a wiki page where we describe the issue in more detail and provide possible alternatives.

I also believe it should be more prominent...

Copy link
Member Author

Choose a reason for hiding this comment

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

@gbraad gbraad force-pushed the yum-unsupported branch from d4d252a to e680bca Compare July 20, 2017 06:16
@gbraad
Copy link
Member Author

gbraad commented Jul 20, 2017

RHEL

done...

@gbraad gbraad force-pushed the yum-unsupported branch from e680bca to 27bf600 Compare July 20, 2017 07:12
@gbraad
Copy link
Member Author

gbraad commented Jul 20, 2017

This includes #123, so if rebasing... that PR should go first

@gbraad gbraad force-pushed the yum-unsupported branch from 27bf600 to 3d05a98 Compare July 21, 2017 02:30

function banner() {
hr
echo -e "\n Installing additional packages is not supported. For more information, see:"
Copy link
Member

Choose a reason for hiding this comment

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

s/is/are/ . Some how missed it before.

Copy link
Member

Choose a reason for hiding this comment

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

Why 'are'? 'Is' is referring to 'Installing'

Copy link
Member Author

@gbraad gbraad Jul 21, 2017

Choose a reason for hiding this comment

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

Actually... it is referring to an action/verb and not the object. The action is "installing packages" which is a single thing.

Example:

  • Eating is exhausting
  • Eating the dish is exhausting
  • Eating the dishes is exhausting

because 'is' refers to 'eating'.

# Show a warning banner when using yum to install software
mv /usr/bin/yum /usr/bin/yum-unsupported
# Place holder for base64 encode yum-wrapper script
cat > yum-wrapper.base64 << EOF
Copy link
Member

Choose a reason for hiding this comment

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

I think we could simplify this inclusion of encoded data even more, almost to a degree where you just do something like '${yum_wrapper}'. The current approach is quite fragile.

Copy link
Member Author

Choose a reason for hiding this comment

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

less fragile than including the script and using escaping... but I can try to see if this suggestion works as expected, as it is not really a bash substitution that happens AFAIR.

Copy link
Member

Choose a reason for hiding this comment

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

@gbraad I guess you have fixed as per @hferentschik 's comment or you guys still discussing?

@gbraad gbraad force-pushed the yum-unsupported branch from 3d05a98 to b6cabca Compare July 24, 2017 03:39
@LalatenduMohanty
Copy link
Member

@gbraad Please fix the merge conflict.

@gbraad
Copy link
Member Author

gbraad commented Jul 25, 2017 via email

@LalatenduMohanty
Copy link
Member

LalatenduMohanty commented Jul 25, 2017

We need to confirm the link first, before able to merge. Don't want to do 2 pushes to get this done.

Right. First we need https://docs.openshift.org/latest/minishift/using/troubleshooting.html#install-additional-software-not-supported to be up i.e. minishift/minishift#1152

@LalatenduMohanty LalatenduMohanty changed the title Issue #116 Show banner when installing packages using yum [Do not merge] Issue #116 Show banner when installing packages using yum Jul 25, 2017
@gbraad gbraad force-pushed the yum-unsupported branch 4 times, most recently from 3baaaa0 to 61e7985 Compare July 26, 2017 10:17
@gbraad gbraad force-pushed the yum-unsupported branch from 61e7985 to 4ab12f7 Compare July 26, 2017 10:39

function banner() {
hr
echo -e "Installing additional packages on the root filesystem might exceed the allocated overlay size and lock the Minishift VM. Proceed with the installation at your own risk."
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure about the word overlay size. Not sure what is supposed to mean. @thatdocslady @gbraad can you please explain it a little.

@LalatenduMohanty LalatenduMohanty dismissed their stale review July 26, 2017 11:59

It look sfine to me.

@LalatenduMohanty LalatenduMohanty changed the title [Do not merge] Issue #116 Show banner when installing packages using yum Issue #116 Show banner when installing packages using yum Jul 26, 2017
@praveenkumar
Copy link
Collaborator

Test with RHEL ISO and worked as exected

$ ./minishift ssh
[docker@minishift ~]$ sudo yum install vim
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Installing additional packages on the root filesystem might exceed the allocated overlay size and lock the Minishift VM. Proceed with the installation at your own risk.
For more information, see https://docs.openshift.org/latest/minishift/using/troubleshooting.html#root-filesystem-exceeds-overlay-size
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Are you sure you want to continue? [y/N]
n
[docker@minishift ~]$ sudo yum install vim
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Installing additional packages on the root filesystem might exceed the allocated overlay size and lock the Minishift VM. Proceed with the installation at your own risk.
For more information, see https://docs.openshift.org/latest/minishift/using/troubleshooting.html#root-filesystem-exceeds-overlay-size
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Are you sure you want to continue? [y/N]
y
Loaded plugins: product-id, search-disabled-repos, subscription-manager

@praveenkumar praveenkumar merged commit 8ef2db5 into minishift:master Jul 26, 2017
@gbraad
Copy link
Member Author

gbraad commented Jul 27, 2017

@praveenkumar also verify, although late, if yum install -y vim works. It should show the banner, but not show the continue prompt.

@gbraad gbraad deleted the yum-unsupported branch July 27, 2017 02:38
@gbraad gbraad restored the yum-unsupported branch July 27, 2017 02:38
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.

4 participants