Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into HEAD
Browse files Browse the repository at this point in the history
Change-Id: I143fd87d2748c68ec24d3fe4ff44f08349b70699
  • Loading branch information
morucci committed Jan 24, 2023
2 parents 1ba27b5 + b4bbeae commit 0411215
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 29 deletions.
2 changes: 1 addition & 1 deletion ansible/roles/sf-nodepool/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ container_gid: 10001

dib_upstream_elements: True

nodepool_version: 8.0.1
nodepool_version: 8.1.0
nodepool_container_version: "{{ nodepool_version }}-1"

nodepool_services:
Expand Down
4 changes: 2 additions & 2 deletions ansible/roles/sf-zuul/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ zuul_lib_dir: "/var/lib/zuul"
zuul_log_dir: "/var/log/zuul"
zuul_share_dir: "/usr/share/javascript/zuul"

zuul_version: "8.0.1"
zuul_container_version: "{{ zuul_version }}-6"
zuul_version: "8.1.0"
zuul_container_version: "{{ zuul_version }}-1"
zuul_client_version: "a6ce77acffd852219fd43a6dc61cbe637aa85bf2"
zuul_client_container_version: "{{ zuul_client_version }}-1"

Expand Down
5 changes: 4 additions & 1 deletion sfconfig/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def main():
args.glue['force_update_tasks'] = False

# Make sure the yaml files are updated
sfconfig.upgrade.update_sfconfig(args)
upgrade_warnings = sfconfig.upgrade.update_sfconfig(args)
sfconfig.upgrade.update_arch(args)
fix_rhel_centos_name(args.glue)

Expand Down Expand Up @@ -330,6 +330,9 @@ def main():
""" % (args.sfconfig['fqdn'], args.sfconfig['fqdn']))
open(prev_fqdn_path, "w").write(args.sfconfig['fqdn'])

if upgrade_warnings:
print(upgrade_warnings)

try:
notification = open(
"/var/lib/software-factory/ansible/notification.txt").read()
Expand Down
49 changes: 24 additions & 25 deletions sfconfig/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

import os
import sys
import time
import uuid
import re
from sfconfig.utils import pread
Expand Down Expand Up @@ -300,6 +299,13 @@ def update_sfconfig(args):
"admin_password:.*", "admin_password: %s" % new_pass, raw_config))

# 3.8 - Keycloak related stuff
if sf_version != "master" and sf_version < "3.8":
return keycloak_warnings(data, args)
else:
return None


def keycloak_warnings(data, args):
keycloak_warning = ""
gh_break = False
oauth2 = data["authentication"].get('oauth2')
Expand Down Expand Up @@ -353,41 +359,34 @@ def update_sfconfig(args):
keycloak_warning += ("SAML2 authentication must be configured "
"in Keycloak directly.\n")
if len(keycloak_warning) > 0:
print("The following authentication settings are obsolete. "
"You can remove them from the configuration file "
"at any time, they will be safely ignored by sf-config:\n\n")
print(keycloak_warning)
keycloak_warning = (
"The following authentication settings are obsolete. "
"You can remove them from the configuration file "
"at any time, they will be safely ignored by sf-config:\n\n") +\
keycloak_warning
if gh_break:
fqdn = args.sfconfig.get('fqdn', "{FQDN}")
print("""
#####################################################
# WARNING #
#####################################################
keycloak_warning += ("""
#################################################################
# WARNING #
#################################################################
(The program will pause for a few seconds, resume by hitting
Ctrl+c)
Github is configured as a third-party authenticator. If you were
using this authenticator prior to this upgrade, the authorization
callback URL must be updated on Github due to a new SSO service
being used in SF 3.8; otherwise authentication with Github will
be broken.
Github is configured as a third-party authenticator.
You need to get on the Github OAuth application settings page
(https://github.com/settings/developers then "OAuth Apps")
(https://github.com/settings/developers then "OAuth Apps")
to update the authorization callback URL to the following
new value:
https://%s/auth/realms/SF/broker/github/endpoint
""" % fqdn)
try:
for remaining in range(20, 0, -1):
sys.stdout.write("\r")
sys.stdout.write(
"{:2d} seconds until resuming.".format(remaining)
)
sys.stdout.flush()
time.sleep(1)
print("\rResuming upgrade.")
except KeyboardInterrupt:
sys.stdout.flush()
print("\rCountdown interrupted, resuming upgrade.")
return keycloak_warning


def runc_provider_exists():
Expand Down

0 comments on commit 0411215

Please sign in to comment.