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

CLI fix offline command save stacks to tars #5269

Merged
merged 1 commit into from
Jun 2, 2017
Merged

Conversation

riuvshin
Copy link
Contributor

@riuvshin riuvshin commented Jun 2, 2017

What does this PR do?

fixes two issues related to CLI offline mode during stack images saving

first issue:
if image name has more than 1 / symbol like registry.centos.org/che-stacks/vertx save to tar will fail:

...
INFO: (che offline): Saving /Users/roman/development/codenvy_projects/.che/backup/eclipse_ubuntu_jre.tar...
INFO: (che offline): Saving /Users/roman/development/codenvy_projects/.che/backup/eclipse_ubuntu_python.tar...
INFO: (che offline): Saving /Users/roman/development/codenvy_projects/.che/backup/eclipse_ubuntu_wildfly8.tar...
INFO: (che offline): Saving /Users/roman/development/codenvy_projects/.che/backup/registry.centos.org_che-stacks/vertx.tar...
/scripts/base/commands/cmd_offline.sh: line 142: /data/backup/registry.centos.org_che-stacks/vertx.tar: No such file or directory
ERROR: Docker was interrupted while saving /data/backup/registry.centos.org_che-stacks/vertx.tar

to fix this I;ve updated sed pattern to replace all / symbols with _

second issue:
if images-stacks file has any empty line like this https://github.com/eclipse/che/blob/master/dockerfiles/cli/version/5.11.2/images-stacks#L24
that will cause an error during iterating over array which is made from that file:

...
INFO: (che offline):   Image eclipse/ubuntu_wildfly8 already saved...skipping
INFO: (che offline):   Image registry.centos.org/che-stacks/vertx already saved...skipping
/scripts/base/commands/cmd_offline.sh: line 133: 1: unbound variable

to fix this I;ve added check on empty strings:

What issues does this PR fix or reference?

#5268

Changelog

CLI fix offline command save stacks to tars

@riuvshin riuvshin added the kind/bug Outline of a bug - must adhere to the bug report template. label Jun 2, 2017
@riuvshin riuvshin requested review from benoitf and a user June 2, 2017 09:43
@riuvshin riuvshin added this to the 5.12.0 milestone Jun 2, 2017
@riuvshin riuvshin changed the title CLI fix offline save stacks to tars CLI fix offline command save stacks to tars Jun 2, 2017
@codenvy-ci
Copy link

@riuvshin riuvshin merged commit 55e6720 into master Jun 2, 2017
@riuvshin riuvshin deleted the fix_offline_save branch June 2, 2017 12:12
JPinkney pushed a commit to JPinkney/che that referenced this pull request Aug 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Outline of a bug - must adhere to the bug report template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants