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

ARTESCA-3572 Allow the removal of Metalk8s archives in iso-manager #3730

Merged
merged 2 commits into from
Jun 23, 2022

Conversation

sayf-eddine-scality
Copy link
Contributor

Component:

Context:
Allow the removal of the iso
Summary:

./iso-manager.sh --rm-archive /root/metalk8s-2.10.7.iso

Acceptance criteria:


Closes: #ISSUE_NUMBER

@bert-e
Copy link
Contributor

bert-e commented Mar 18, 2022

Hello sayf-eddine-scality,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Status report is not available.

@bert-e
Copy link
Contributor

bert-e commented Mar 18, 2022

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

Copy link
Collaborator

@TeddyAndrieux TeddyAndrieux left a comment

Choose a reason for hiding this comment

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

Few comments (if you add salt module you also need to add unit tests 😉 )

scripts/iso-manager.sh Show resolved Hide resolved
salt/_modules/metalk8s.py Outdated Show resolved Hide resolved
salt/_modules/metalk8s.py Outdated Show resolved Hide resolved
salt/metalk8s/archives/unmounted.sls Show resolved Hide resolved
salt/metalk8s/archives/unmounted.sls Outdated Show resolved Hide resolved
salt/metalk8s/archives/unmounted.sls Outdated Show resolved Hide resolved
Comment on lines 52 to 73
{% set removable_archives = salt.metalk8s.get_removable_archives() %}
{% for env in removable_archives %}
Remove config for env {{ env }}:
file.absent:
- name: {{ salt.file.join(repo.config.directory, '99-' ~ env ~ '-registry.inc') }}
{% endfor %}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Again, to me we manage the full repo.config.directory so if we don't know a file in this directory we just remove it, since it's a bit complicated with solutions I suggest just checking all 99-metalk8s-* we remove all files that are not expected

Copy link
Contributor

Choose a reason for hiding this comment

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

🤔 what if the Solution is called metalk8s-solution-example..? I'll go with a regex such as 99-metalk8s-[0-9].*, should be enough.

Also, this state is a bit strange, we're not really managing all the includes, only adding one for the current version 😕... I'll leave it like that but still confusing IMHO

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe solutions shouldn't have the "99-" prefix but another one, or yes just a simple regex

Also, this state is a bit strange, we're not really managing all the includes, only adding one for the current version confused... I'll leave it like that but still confusing IMHO

That is my point, to me, we may want to change this state so that it basically "computes" the full directory content

@bert-e
Copy link
Contributor

bert-e commented Jun 9, 2022

Branches have diverged

This pull request's source branch improvement/ARTESCA-3572-handle-iso-removal has diverged from
development/123.0 by more than 50 commits.

To avoid any integration risks, please re-synchronize them using one of the
following solutions:

  • Merge origin/development/123.0 into improvement/ARTESCA-3572-handle-iso-removal
  • Rebase improvement/ARTESCA-3572-handle-iso-removal onto origin/development/123.0

Note: If you choose to rebase, you may have to ask me to rebuild
integration branches using the reset command.

@gdemonet gdemonet force-pushed the improvement/ARTESCA-3572-handle-iso-removal branch from 75ee9af to 8dd0298 Compare June 9, 2022 08:30
@bert-e
Copy link
Contributor

bert-e commented Jun 9, 2022

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

@gdemonet gdemonet force-pushed the improvement/ARTESCA-3572-handle-iso-removal branch 7 times, most recently from e07fa84 to d8503b1 Compare June 14, 2022 13:58
Copy link
Collaborator

@TeddyAndrieux TeddyAndrieux left a comment

Choose a reason for hiding this comment

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

Overall LGTM

CHANGELOG.md Outdated Show resolved Hide resolved
eve/main.yml Outdated Show resolved Hide resolved
salt/_modules/metalk8s.py Outdated Show resolved Hide resolved
salt/metalk8s/archives/mounted.sls Show resolved Hide resolved
salt/metalk8s/archives/unmounted.sls Show resolved Hide resolved
scripts/iso-manager.sh Outdated Show resolved Hide resolved
scripts/iso-manager.sh Outdated Show resolved Hide resolved
salt/metalk8s/archives/unmounted.sls Show resolved Hide resolved
scripts/iso-manager.sh Show resolved Hide resolved
@gdemonet gdemonet force-pushed the improvement/ARTESCA-3572-handle-iso-removal branch 3 times, most recently from e2a95a2 to af930d8 Compare June 21, 2022 15:38
@bert-e

This comment was marked as resolved.

@gdemonet gdemonet force-pushed the improvement/ARTESCA-3572-handle-iso-removal branch from af930d8 to fb95ab9 Compare June 22, 2022 06:26
@bert-e
Copy link
Contributor

bert-e commented Jun 22, 2022

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

sayf-eddine-scality and others added 2 commits June 23, 2022 08:18
This adds a `-r`/`--rm-archive` option to the script, and deprecates the
`--archive` in favor of `--add-archive` (for disambiguation).

It also slightly reworks our module extracting info from the
`product.txt` file in archives, to ensure the contents are valid at this
stage, instead of having error management in the
`metalk8s.archives.mounted` state.
To make sure we can safely remove an old ISO, we do so in upgrade tests,
prior to running the test suite on the upgraded cluster.
@gdemonet gdemonet force-pushed the improvement/ARTESCA-3572-handle-iso-removal branch from fb95ab9 to 7d5ece4 Compare June 23, 2022 06:18
@gdemonet
Copy link
Contributor

/bypass_author_approval

@bert-e
Copy link
Contributor

bert-e commented Jun 23, 2022

In the queue

The changeset has received all authorizations and has been added to the
relevant queue(s). The queue(s) will be merged in the target development
branch(es) as soon as builds have passed.

The changeset will be merged in:

  • ✔️ development/123.0

The following branches will NOT be impacted:

  • development/2.0
  • development/2.1
  • development/2.10
  • development/2.11
  • development/2.2
  • development/2.3
  • development/2.4
  • development/2.5
  • development/2.6
  • development/2.7
  • development/2.8
  • development/2.9

There is no action required on your side. You will be notified here once
the changeset has been merged. In the unlikely event that the changeset
fails permanently on the queue, a member of the admin team will
contact you to help resolve the matter.

IMPORTANT

Please do not attempt to modify this pull request.

  • Any commit you add on the source branch will trigger a new cycle after the
    current queue is merged.
  • Any commit you add on one of the integration branches will be lost.

If you need this pull request to be removed from the queue, please contact a
member of the admin team now.

The following options are set: bypass_author_approval

@bert-e
Copy link
Contributor

bert-e commented Jun 23, 2022

I have successfully merged the changeset of this pull request
into targetted development branches:

  • ✔️ development/123.0

The following branches have NOT changed:

  • development/2.0
  • development/2.1
  • development/2.10
  • development/2.11
  • development/2.2
  • development/2.3
  • development/2.4
  • development/2.5
  • development/2.6
  • development/2.7
  • development/2.8
  • development/2.9

Please check the status of the associated issue ARTESCA-3572.

Goodbye sayf-eddine-scality.

@bert-e bert-e merged commit 7d5ece4 into development/123.0 Jun 23, 2022
@bert-e bert-e deleted the improvement/ARTESCA-3572-handle-iso-removal branch June 23, 2022 09:55
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