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

Support builds-on/runs-on arm #94

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Conversation

addyess
Copy link
Contributor

@addyess addyess commented May 2, 2024

Adding a builds-on/runs-on arm64 section for each charm

  • Each architecture will have a unique charm for the eventual some-day when we need binary bits in the charms
  • Build each architecture with GH builders

@addyess addyess requested a review from a team as a code owner May 2, 2024 15:54
@@ -58,6 +72,7 @@ parts:
charm:
build-packages: [git]
charm-entrypoint: k8s/src/charm.py
charm-requirements: [k8s/requirements.txt]
Copy link
Contributor Author

@addyess addyess May 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

worker charm can specify it's requirements.txt so that the python reqs can be installed with no-binary

Copy link
Member

@mateoflorido mateoflorido left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@addyess addyess force-pushed the akd/support-arm64-builds branch 7 times, most recently from 6c4b410 to fc4546b Compare May 2, 2024 18:25
@addyess addyess marked this pull request as draft May 2, 2024 19:17
@addyess addyess force-pushed the akd/support-arm64-builds branch 6 times, most recently from fea3024 to d472d1e Compare May 9, 2024 19:15
@addyess
Copy link
Contributor Author

addyess commented May 9, 2024

NOW this PR depends on merging of this PR in order to get multiarch builds back

@addyess
Copy link
Contributor Author

addyess commented May 14, 2024

thanks to @arturo-seijas and @weiiwang01 for unblocking this

@addyess addyess marked this pull request as ready for review October 26, 2024 03:26
@addyess addyess force-pushed the akd/support-arm64-builds branch 3 times, most recently from ababe73 to 3a3b717 Compare October 28, 2024 16:49
@addyess addyess force-pushed the akd/support-arm64-builds branch 5 times, most recently from 81f9f5d to 7627060 Compare October 29, 2024 09:44
@addyess addyess force-pushed the akd/support-arm64-builds branch 2 times, most recently from d2bcb9a to 858254a Compare October 30, 2024 14:44
Copy link
Contributor

Test coverage for c4f6647

coverage-report: install_deps /home/runner/work/k8s-operator/k8s-operator/charms/worker/k8s> python -I -m pip install 'coverage[toml]'
coverage-report: commands[0] /home/runner/work/k8s-operator/k8s-operator/charms/worker/k8s> coverage report
Name                                    Stmts   Miss  Cover
-----------------------------------------------------------
lib/charms/k8s/v0/k8sd_api_manager.py     265     26    90%
src/charm.py                              442    231    48%
src/containerd.py                         140     16    89%
src/cos_integration.py                     33     12    64%
src/reschedule.py                          77      4    95%
src/snap.py                                79      3    96%
src/token_distributor.py                  165     92    44%
-----------------------------------------------------------
TOTAL                                    1201    384    68%
coverage-report: OK (1.17=setup[0.99]+cmd[0.17] seconds)
congratulations :) (1.22 seconds)

Static code analysis report

Run started:2024-10-30 22:31:33.697076

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 2714
  Total lines skipped (#nosec): 14
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

Comment on lines +49 to +51
extra-arguments: >-
${{needs.extra-args.outputs.args}} -k test_${{ matrix.suite }}
${{ matrix.arch.id == 'arm64' && ' --lxd-containers' || '' }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did some study on a failure on ARM now that we're testing with lxd VMs.

lxd is required to use /dev/kvm, but on ARM64 -- /dev/kvm may not exist. I even logged into the machine and tried to add sudo modprobe kvm but it fails to load the kernel mode.

without /dev/kvm -- lxd doesn't start the machines and the tests fail

Therefore -- this change allows for lxd-containers on ARM -- but i expect we'd need arm64 to support /dev/kvm or don't use lxd as a cloud for arm64

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