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

Kairos 3.x Alpine - P2P k3s HA cluster creation failed #2789

Closed
dan1el-k opened this issue Aug 4, 2024 · 0 comments · Fixed by kairos-io/provider-kairos#636
Closed

Kairos 3.x Alpine - P2P k3s HA cluster creation failed #2789

dan1el-k opened this issue Aug 4, 2024 · 0 comments · Fixed by kairos-io/provider-kairos#636
Assignees
Labels
bug Something isn't working

Comments

@dan1el-k
Copy link

dan1el-k commented Aug 4, 2024

Kairos version:
grafik

CPU architecture, OS, and Version:
amd64

Describe the bug

I have tried installing a k3s HA cluster with 3 Masters and 2 Workers using latest Kairos with Alpine.
It seems that the P2P functionality is not working using Alpine base images. After Kairos installation and reboot of the VM, the agent is running but gives following error in /var/log/kairos/agent.log

...
edgevpn: unrecognized option: enable-healthchecks
...

sudo kairos role list: gives not output

k3s service is also not running.

To Reproduce

#cloud-config

hostname: homeserver-k3s-{{ trunc 4 .MachineID }}

users:
- name: "kairos"
  passwd: "kairos"
  groups: 
    - "admin"
  ssh_authorized_keys:
    - ssh-rsa xxx

install:
  # Device for automated installs
  device: "/dev/sda"
  # Reboot after installation
  reboot: false
  # Power off after installation
  poweroff: true
  # Set to true to enable automated installations
  auto: true

kubevip:
  eip: "10.43.3.100"

p2p:
  # Disabling DHT makes co-ordination to discover nodes only in the local network
  disable_dht: true #Enabled by default

  # to run multiple clustes in the same network
  network_id: homeserver

  vpn:
    create: false # defaults to true
    use: false # defaults to true
  # network_token is the shared secret used by the nodes to co-ordinate with p2p.
  # Setting a network token implies auto.enable = true.
  # To disable, just set auto.enable = false
  network_token: ""

  # Automatic cluster deployment configuration
  auto:
    # Enables Automatic node configuration (self-coordination)
    # for role assignment
    enable: true
    # HA enables automatic HA roles assignment.
    # A master cluster init is always required,
    # Any additional master_node is configured as part of the 
    # HA control plane.
    # If auto is disabled, HA has no effect.
    ha:
      # Enables HA control-plane
      enable: true
      # Number of HA additional master nodes.
      # A master node is always required for creating the cluster and is implied.
      # The setting below adds 2 additional master nodes, for a total of 3.
      master_nodes: 2

k3s:
  args:
  - --cluster-cidr 10.42.0.0/16
  - --cluster-dns "10.100.0.10"
  - --service-cidr 10.100.0.0/16
  - --disable=servicelb
  - --disable=traefik
  - --tls-san 10.43.3.100
  etcd-arg:
  - --snapshot-count 5000

# Additional manifests that are applied by k3s on boot
write_files:
...

Expected behavior

P2P HA k3s cluster creation works for Alpine base images, together with custom k3s args.

Logs
grafik

Additional context

I was already able to setup a k3s cluster in HA mode with kairos 2.x using a similar kairos-config yaml, but with Fedora as a base image

@dan1el-k dan1el-k added bug Something isn't working triage Add this label to issues that should be triaged and prioretized in the next planning call unconfirmed labels Aug 4, 2024
@jimmykarily jimmykarily moved this from Todo 🖊 to In Progress 🏃 in 🧙Issue tracking board Aug 12, 2024
@jimmykarily jimmykarily removed the triage Add this label to issues that should be triaged and prioretized in the next planning call label Aug 12, 2024
@jimmykarily jimmykarily self-assigned this Sep 13, 2024
jimmykarily added a commit to kairos-io/provider-kairos that referenced this issue Sep 13, 2024
Fixes kairos-io/kairos#2789

Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
@github-project-automation github-project-automation bot moved this from Under review 🔍 to Done ✅ in 🧙Issue tracking board Sep 13, 2024
renovate bot referenced this issue in marinatedconcrete/config Sep 22, 2024
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [kairos-io/kairos](https://github.com/kairos-io/kairos) |
patch | `v3.1.2` -> `v3.1.3` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>kairos-io/kairos (kairos-io/kairos)</summary>

###
[`v3.1.3`](https://github.com/kairos-io/kairos/releases/tag/v3.1.3)

[Compare
Source](https://github.com/kairos-io/kairos/compare/v3.1.2...v3.1.3)

##### Release highlights:

- In the previous release, we introduced a fix for the broken
permissions of the user's home directory. It turned out that the fix
only applied to users created by the top level `users:` key in the
Kairos configuration file. In this release, users created in various
stages will also get their home directory permissions fixed. If for some
reason, you don't want [the script]() to recursively fix the home
directory permissions, you can create [a sentinel
file](https://github.com/kairos-io/packages/blob/2fce89f6499a722768b1c58b6eace5ed7e45742d/packages/static/kairos-overlay-files/files/usr/bin/fix-home-dir-ownership#L5-L7)
to skip the fix and apply it on your own as you see fit.
- Fixed an issue where we didn't calculate the upgrade image size and
the always created an image with the default size
([https://github.com/kairos-io/kairos/issues/2818](https://github.com/kairos-io/kairos/issues/2818))
- Fixed an issue in Kairos upgrades through Kuberentes, where various
host directories were also used in image size calculation
([https://github.com/kairos-io/kairos-agent/pull/537](https://github.com/kairos-io/kairos-agent/pull/537))
- We now display the webui url below the QR code to avoid people having
to plug a keyboard just to find the IP address of the node
([https://github.com/kairos-io/kairos/issues/2826](https://github.com/kairos-io/kairos/issues/2826))
- Fixed a bug in Alpine flavors where we passed the edgevpn arguments in
the openrc service file wrongly
([https://github.com/kairos-io/kairos/issues/2789](https://github.com/kairos-io/kairos/issues/2789))
-   Lots of version bumps on dependencies (mostly automated).

##### Known Issues

- \[Carry over from previous releases] RPi EFI booting no longer
supported on kernels shipped with Ubuntu 24.04+
[#&#8203;2249](https://github.com/kairos-io/kairos/issues/2249)

##### What's Changed

- Add permissions to generic arm release pipeline by
[@&#8203;mauromorales](https://github.com/mauromorales) in
[https://github.com/kairos-io/kairos/pull/2840](https://github.com/kairos-io/kairos/pull/2840)
- Update tj-actions/changed-files action to v45 by
[@&#8203;renovate](https://github.com/renovate) in
[https://github.com/kairos-io/kairos/pull/2816](https://github.com/kairos-io/kairos/pull/2816)
- Add upgrade uki test by
[@&#8203;jimmykarily](https://github.com/jimmykarily) in
[https://github.com/kairos-io/kairos/pull/2776](https://github.com/kairos-io/kairos/pull/2776)
- Update dependency go to v1.23.1 by
[@&#8203;renovate](https://github.com/renovate) in
[https://github.com/kairos-io/kairos/pull/2845](https://github.com/kairos-io/kairos/pull/2845)
- Generate relative paths to files by
[@&#8203;jimmykarily](https://github.com/jimmykarily) in
[https://github.com/kairos-io/kairos/pull/2846](https://github.com/kairos-io/kairos/pull/2846)
- 🤖 Make arm64 workers use docker mirror by
[@&#8203;Itxaka](https://github.com/Itxaka) in
[https://github.com/kairos-io/kairos/pull/2850](https://github.com/kairos-io/kairos/pull/2850)
- 🐛 Fix wifi cloud-config example by
[@&#8203;jimmyjones2](https://github.com/jimmyjones2) in
[https://github.com/kairos-io/kairos/pull/2820](https://github.com/kairos-io/kairos/pull/2820)
- 📖 Add alpine wifi cloud-config by
[@&#8203;jimmyjones2](https://github.com/jimmyjones2) in
[https://github.com/kairos-io/kairos/pull/2819](https://github.com/kairos-io/kairos/pull/2819)
- Update anchore/grype Docker tag to v0.80.1 by
[@&#8203;renovate](https://github.com/renovate) in
[https://github.com/kairos-io/kairos/pull/2852](https://github.com/kairos-io/kairos/pull/2852)
- Update aquasec/trivy Docker tag to v0.55.0 by
[@&#8203;renovate](https://github.com/renovate) in
[https://github.com/kairos-io/kairos/pull/2781](https://github.com/kairos-io/kairos/pull/2781)
- Update aquasec/trivy Docker tag to v0.55.1 by
[@&#8203;renovate](https://github.com/renovate) in
[https://github.com/kairos-io/kairos/pull/2854](https://github.com/kairos-io/kairos/pull/2854)
- Update github/codeql-action action to v3.26.6 by
[@&#8203;renovate](https://github.com/renovate) in
[https://github.com/kairos-io/kairos/pull/2799](https://github.com/kairos-io/kairos/pull/2799)
- Fix test printing old value for debugging by
[@&#8203;jimmykarily](https://github.com/jimmykarily) in
[https://github.com/kairos-io/kairos/pull/2855](https://github.com/kairos-io/kairos/pull/2855)
- Update google/osv-scanner-action action to v1.8.5 by
[@&#8203;renovate](https://github.com/renovate) in
[https://github.com/kairos-io/kairos/pull/2853](https://github.com/kairos-io/kairos/pull/2853)
- Update quay.io/kairos/framework Docker tag to v2.11.5 by
[@&#8203;renovate](https://github.com/renovate) in
[https://github.com/kairos-io/kairos/pull/2856](https://github.com/kairos-io/kairos/pull/2856)
- Update github/codeql-action action to v3.26.7 by
[@&#8203;renovate](https://github.com/renovate) in
[https://github.com/kairos-io/kairos/pull/2858](https://github.com/kairos-io/kairos/pull/2858)
- Update quay.io/kairos/framework Docker tag to v2.11.7 by
[@&#8203;renovate](https://github.com/renovate) in
[https://github.com/kairos-io/kairos/pull/2859](https://github.com/kairos-io/kairos/pull/2859)
- Split the uploading of trivy and grype results by
[@&#8203;jimmykarily](https://github.com/jimmykarily) in
[https://github.com/kairos-io/kairos/pull/2860](https://github.com/kairos-io/kairos/pull/2860)

##### New Contributors

- [@&#8203;jimmyjones2](https://github.com/jimmyjones2) made
their first contribution in
[https://github.com/kairos-io/kairos/pull/2820](https://github.com/kairos-io/kairos/pull/2820)

**Full Changelog**:
kairos-io/kairos@v3.1.2...v3.1.3

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/marinatedconcrete/config).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants