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

Check for valid CA minion at the beginning of the bootstrap #3065

Merged
merged 2 commits into from
Feb 3, 2021

Conversation

TeddyAndrieux
Copy link
Collaborator

@TeddyAndrieux TeddyAndrieux commented Jan 22, 2021

Component:

'script', 'bootstrap'

Context:

When trying to install the bootstrap node and providing an invalid CA minion in the Bootstrap configuration file. Bootstrap script fail with not clear error about Salt-api unable to starts etc.

Summary:

Currently in the bootstrap we use the local node as bootstrap node and
also as CA minion, adding a check to be sure that the minion id provided
in the bootstrap config match the local minion id.
NOTE: This check is only part of the script and not somewhere else in
Salt, the CA:minion key inside the bootstrap configuration
is here for being able to install MetalK8s using another Salt minion
as CA (Which is to yet supported by the bootstrap script)

Acceptance criteria:

Output when providing invalid minion id as CA minion in bootstrap configuration

# /srv/scality/metalk8s-2.8.0-dev/bootstrap.sh 
> Determine the OS... done [0s]
> Checking that BootstrapConfiguration is present... done [0s]
> Pre-minion system tests... done [0s]
> Configure internal repositories... done [0s]
> Check mandatory packages presence... done [8s]
> Disabling Salt minion service... done [0s]
> Stopping Salt minion service... done [0s]
> Installing mandatory packages... done [0s]
> Configuring Salt minion to run in local mode... done [6s]
> Ensure archive is available... done [2s]
> Checking local node... fail [7s]

Failure while running step 'Checking local node'

Command: check_local_node

Output:

<< BEGIN >>
local:
    True
CA minion "bootstrap" from bootstrap configuration is not equal to the local minion id "test-bootstrap.novalocal", you need to either change the local minion id, either update the bootstrap configuration.
<< END >>

This script will now exit


@TeddyAndrieux TeddyAndrieux added topic:deployment Bugs in or enhancements to deployment stages kind:debt Technical debt complexity:easy Something that requires less than a day to fix labels Jan 22, 2021
@TeddyAndrieux TeddyAndrieux requested a review from a team January 22, 2021 16:53
@bert-e
Copy link
Contributor

bert-e commented Jan 22, 2021

Hello teddyandrieux,

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 Jan 22, 2021

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 added this to the MetalK8s 2.8.0 milestone Feb 1, 2021
scripts/common.sh.in Outdated Show resolved Hide resolved
@bert-e
Copy link
Contributor

bert-e commented Feb 3, 2021

Conflict

There is a conflict between your branch improvement/check-for-ca-minion and the
destination branch development/2.8.

Please resolve the conflict on the feature branch (improvement/check-for-ca-minion).

 $ git fetch
 $ git checkout origin/improvement/check-for-ca-minion
 $ git merge origin/development/2.8
 $ # <intense conflict resolution>
 $ git commit
 $ git push origin HEAD:improvement/check-for-ca-minion

Currently in the bootstrap we use the local node as bootstrap node and
also as CA minion, adding a check to be sure that the minion id provided
in the bootstrap config match the local minion id.
NOTE: This check is only part of the script and not somewhere else in
Salt, the `CA:minion` key inside the bootstrap configuration
is here for being able to install MetalK8s using another Salt minion
as CA
@bert-e
Copy link
Contributor

bert-e commented Feb 3, 2021

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:

@TeddyAndrieux
Copy link
Collaborator Author

/approve

@bert-e
Copy link
Contributor

bert-e commented Feb 3, 2021

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/2.8

The following branches will NOT be impacted:

  • development/1.0
  • development/1.1
  • development/1.2
  • development/1.3
  • development/2.0
  • development/2.1
  • development/2.2
  • development/2.3
  • development/2.4
  • development/2.5
  • development/2.6
  • development/2.7

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: approve

@bert-e
Copy link
Contributor

bert-e commented Feb 3, 2021

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

  • ✔️ development/2.8

The following branches have NOT changed:

  • development/1.0
  • development/1.1
  • development/1.2
  • development/1.3
  • development/2.0
  • development/2.1
  • development/2.2
  • development/2.3
  • development/2.4
  • development/2.5
  • development/2.6
  • development/2.7

Please check the status of the associated issue None.

Goodbye teddyandrieux.

@bert-e bert-e merged commit b891c77 into development/2.8 Feb 3, 2021
@bert-e bert-e deleted the improvement/check-for-ca-minion branch February 3, 2021 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity:easy Something that requires less than a day to fix kind:debt Technical debt topic:deployment Bugs in or enhancements to deployment stages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants