This repository was archived by the owner on Jun 28, 2024. It is now read-only.
ci: Fix FC installation script#1855
Merged
jodh-intel merged 1 commit intokata-containers:masterfrom Jul 26, 2019
Merged
Conversation
While running multiple times the fc installation script fails to detect the variables of driver and path at the configuration file. This ensures that we can detect those variables. Fixes kata-containers#1854 Signed-off-by: Gabriela Cervantes <gabriela.cervantes.tellez@intel.com>
4 tasks
marcov
reviewed
Jul 25, 2019
| if [ -f $docker_configuration_file ]; then | ||
| # Check devicemapper flag | ||
| check_devicemapper=$(grep -w '"storage-driver": "${driver}"' $docker_configuration_file | wc -l) | ||
| check_devicemapper=$(grep -w '"storage-driver": "'${driver}'"' $docker_configuration_file | wc -l) |
Contributor
There was a problem hiding this comment.
Thanks @GabyCT
Can you explain why both " and ' are necessary here?
Contributor
Author
There was a problem hiding this comment.
@marcov the docker configuration should looks like
"storage-driver": "devicemapper"
however, before like I have it grep -w '"storage-driver": "${driver}"' the variable of driver was not being replaced and that was causing to the script to fail when you run it multiple times
Contributor
Author
There was a problem hiding this comment.
it was doing this the script
grep -w '"storage-driver": "${driver}"' /etc/docker/daemon.json
but now with this change is replacing the variable correctly
grep -w '"storage-driver": "devicemapper"' /etc/docker/daemon.json
Contributor
There was a problem hiding this comment.
Ahhhhh, now it's clear.
you are concatenating three strings, and the 1st and 3rd are single quoted:
"storage-driver": " + ${driver} + "
Contributor
|
lgtm |
marcov
approved these changes
Jul 25, 2019
Contributor
|
/test |
jodh-intel
approved these changes
Jul 26, 2019
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
While running multiple times the fc installation script fails to
detect the variables of driver and path at the configuration file. This
ensures that we can detect those variables.
Fixes #1854
Signed-off-by: Gabriela Cervantes gabriela.cervantes.tellez@intel.com