Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Update bootstrap runner profile OCI URL during upgrade #4175

Merged
merged 1 commit into from Nov 3, 2022

Conversation

paladin-devops
Copy link
Contributor

@paladin-devops paladin-devops commented Nov 3, 2022

Prior to this PR, the various -odr-image flags for each platform on server upgrade were being ignored, so you'd end up with this:

% waypoint server upgrade -platform=docker -docker-server-image=waypoint:dev -docker-odr-image=waypoint-odr:dev
// successful upgrade

% waypoint runner profile list
Runner profiles
            NAME           | PLUGIN TYPE |            OCI URL            | TARGET RUNNER | DEFAULT  
---------------------------+-------------+-------------------------------+---------------+----------
  docker-bootstrap-profile | docker      | hashicorp/waypoint-odr:latest | *             | yes     
// the OCI URL did not change 

After this PR:

% waypoint server upgrade -platform=docker -docker-server-image=waypoint:dev -docker-odr-image=waypoint-odr:dev
// successful upgrade

% waypoint runner profile list
Runner profiles
            NAME           | PLUGIN TYPE |     OCI URL      | TARGET RUNNER | DEFAULT  
---------------------------+-------------+------------------+---------------+----------
  docker-bootstrap-profile | docker      | waypoint-odr:dev | *             | yes      

Prior to this commit, the server upgrade command would use the installRunner function to install a new runner during the upgrade with the new version, AND update the runner profile to use the config defined in server_upgrade.go. However, the update of the runner profile never happened, because existingODRConfigSetup was set to true, skipping the code which would update the profile.
@paladin-devops paladin-devops marked this pull request as ready for review November 3, 2022 15:56
@paladin-devops
Copy link
Contributor Author

Tested with Nomad as well:

// install with 0.10.2 CLI
% waypoint install -platform=nomad -nomad-host-volume=waypoint -nomad-runner-host-volume=waypoint-runner -nomad-service-provider=nomad -accept-tos
// success

% waypoint runner profile list
Runner profiles
           NAME           | PLUGIN TYPE |            OCI URL            | TARGET RUNNER | DEFAULT  
--------------------------+-------------+-------------------------------+---------------+----------
  nomad-bootstrap-profile | nomad       | hashicorp/waypoint-odr:latest | *             | yes      

// upgrade w/this branch
% ./waypoint server upgrade -platform=nomad -nomad-host-volume=waypoint -nomad-runner-host-volume=waypoint-runner -nomad-service-provider=nomad -nomad-server-image=hashicorp/waypoint:0.10.2 -nomad-odr-image=hashicorp/waypoint-odr:0.10.2 -auto-approve
// success 

% waypoint runner profile list
Runner profiles
           NAME           | PLUGIN TYPE |            OCI URL            | TARGET RUNNER | DEFAULT  
--------------------------+-------------+-------------------------------+---------------+----------
  nomad-bootstrap-profile | nomad       | hashicorp/waypoint-odr:0.10.2 | *             | yes      

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants