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

make-download-requirements-more-stable #1521

Conversation

sunshine69
Copy link
Contributor

  • Change the order of executing the task download-requirements.yml after we populate the directory /tmp/epi-repository-setup-scripts.

I have hit a situation (many times when re-run from the current system) that this role failed because the script
core/src/epicli/data/common/ansible/playbooks/roles/repository/files/download-requirements/ubuntu-18.04/download-requirements.sh

this part

repos_backup_file="/tmp/epi-repository-setup-scripts/enable-system-repos.sh"
if [[ ! -f /etc/apt/sources.list ]]; then
    if [[ -f /var/tmp/enabled-system-repos.tar ]] && [[ -f ${repos_backup_file} ]]; then
        echol "OS repositories seems missing, restoring..."
        ${repos_backup_file}
    else
        echol "/etc/apt/sources.list seems missing, you either know what you're doing or you need to fix your repositories"
    fi
fi

It comes to the the part /etc/apt/sources.list seems missing, you either know what you're doing or you need to fix your repositories

As you can see this relies on the /tmp/epi-repository-setup-scripts/enable-system-repos.sh.

  • Set DEBIAN_FRONTEND=noninteractive for download-requirements.sh

A similar PR has been addressed this issues but in different place and because
that run before this stage the problem is hidden because these dependencies
packages are already install (libssl). However if you re-run it on existing
system it might happen again. Or in some combination situation it happened
again.

IMHO there is no side effect of adding this change to be sure we are not
prompted by apt for whatever reason.

- Change the order of executing the task download-requirements.yml after we populate the directory /tmp/epi-repository-setup-scripts.

I have hit a situation (many times when re-run from the current system) that this role failed because the script
core/src/epicli/data/common/ansible/playbooks/roles/repository/files/download-requirements/ubuntu-18.04/download-requirements.sh

this part

```
repos_backup_file="/tmp/epi-repository-setup-scripts/enable-system-repos.sh"
if [[ ! -f /etc/apt/sources.list ]]; then
    if [[ -f /var/tmp/enabled-system-repos.tar ]] && [[ -f ${repos_backup_file} ]]; then
        echol "OS repositories seems missing, restoring..."
        ${repos_backup_file}
    else
        echol "/etc/apt/sources.list seems missing, you either know what you're doing or you need to fix your repositories"
    fi
fi

```

It comes to the the part `/etc/apt/sources.list seems missing, you either know what you're doing or you need to fix your repositories`

As you can see this relies on the /tmp/epi-repository-setup-scripts/enable-system-repos.sh.

- Set DEBIAN_FRONTEND=noninteractive for download-requirements.sh

A similar PR has been addressed this issues but in different place and because
that run before this stage the problem is hidden because these dependencies
packages are already install (libssl). However if you re-run it on existing
system it might happen again. Or in some combination situation it happened
again.

IMHO there is no side effect of adding this change to be sure we are not
prompted by apt for whatever reason.
Steve Kieu added 2 commits August 17, 2020 13:39
We did the similar already on Centos and Redhat (twice).

I set it to 5 times for Ubuntu.

Reason is I randomly got error downloading images - see the issue
https://github.com/epiphany-platform/skopeo-bin/issues/7 for more information.
Copy link
Contributor

@rafzei rafzei left a comment

Choose a reason for hiding this comment

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

Looks good to me as well

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.

3 participants