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

restart snapd after configuring proxy #112

Merged
merged 1 commit into from
Aug 8, 2024
Merged

Conversation

eaudetcobello
Copy link

@eaudetcobello eaudetcobello commented Aug 7, 2024

removes the need to restart from preRunCommands like in this example manifest:

apiVersion: bootstrap.cluster.x-k8s.io/v1beta1
kind: MicroK8sConfigTemplate
metadata:
  name: microk8s-maas-md-0
  namespace: default
spec:
  template:
    spec:
      initConfiguration:
        preRunCommands:
        - |
          cat > /usr/local/share/ca-certificates/pcr_ca.crt << EOF
          ...
          EOF
          sudo update-ca-certificates
          curl -sL .../auth/store/assertions | snap ack /dev/stdin
          snap set core proxy.store=...
          sudo systemctl restart snapd

From what I've seen of users configurations they setup the proxy with https manually in preRunCommands, and the last command is a systemctl restart snapd. If they don't restart snapd after setting up certificates snap install fails with an SSL error.

Before 0.6.9 we hardcoded the proxy protocol as http, so we didn't encounter this SSL error, which is why we did not add systemctl restart snapd to the proxy configuration script.

removes the need to restart from preRunCommands
@ktsakalozos ktsakalozos self-requested a review August 8, 2024 15:15
@ktsakalozos
Copy link
Member

LGTM +1

@ktsakalozos ktsakalozos merged commit 7f6bc64 into main Aug 8, 2024
4 checks passed
@ktsakalozos ktsakalozos deleted the eaudetcobello/proxy-patch branch August 8, 2024 15:15
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.

2 participants