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

Disable nix tooling #930

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

gngram
Copy link
Contributor

@gngram gngram commented Dec 11, 2024

Description of changes

  • Disables nix tooling if development setup is not enabled
    - Indirectly disables nix tooling in release build
  • Enables automatic garbaze collection in ghaf-host and disable everywhere else.
  • Fixes:
    https://jira.tii.ae/browse/SSRCSP-3457

Checklist for things done

  • Summary of the proposed changes in the PR description
  • More detailed description in the commit message(s)
  • Commits are squashed into relevant entities - avoid a lot of minimal dev time commits in the PR
  • Contribution guidelines followed
  • Ghaf documentation updated with the commit - https://tiiuae.github.io/ghaf/
  • PR linked to architecture documentation and requirement(s) (ticket id)
  • Test procedure described (or includes tests). Select one or more:
    • Tested on Lenovo X1 x86_64
    • Tested on Jetson Orin NX or AGX aarch64
    • Tested on Polarfire riscv64
  • Author has run make-checks and it passes
  • All automatic Github Action checks pass - see actions
  • Author has added reviewers and removed PR draft status
  • Change requires full re-installation
  • Change can be updated with nixos-rebuild ... switch

Instructions for Testing

  • List all targets that this applies to:
    • Lenovo X1
    • Jetson Orin NX and AGX
  • Is this a new feature
    • List the test steps to verify:
      • In release build, no nix commands should be available, nix daemon should not be running.
        - As Terminal is not available in release flavor, disable nix-setup in ./modules/common/profiles/debug.nix (to imitate release)
        nix-setup.enable = false;

        • Build debug image and run. No nix commands should be available, nix daemon should not be running.
      • In debug build nix daemon should be running in all VMs and automatic garbage collection should be available only in host.

      • If automatic garbaze collection is enabled 'systemctl list-timers' should list 'nix-gc' also

  • If it is an improvement how does it impact existing functionality?

@gngram gngram temporarily deployed to internal-build-workflow December 11, 2024 07:25 — with GitHub Actions Inactive
@gngram gngram force-pushed the pr__disable_nix_tooling branch from 3045be2 to 1413eb9 Compare December 11, 2024 09:26
@gngram gngram temporarily deployed to internal-build-workflow December 11, 2024 09:26 — with GitHub Actions Inactive
@gngram gngram force-pushed the pr__disable_nix_tooling branch from 1413eb9 to 8dac282 Compare December 17, 2024 11:37
@gngram gngram temporarily deployed to internal-build-workflow December 17, 2024 11:37 — with GitHub Actions Inactive
modules/common/development/nix.nix Outdated Show resolved Hide resolved
@gngram gngram force-pushed the pr__disable_nix_tooling branch from 8dac282 to 15ea8ab Compare January 2, 2025 11:14
@gngram gngram temporarily deployed to internal-build-workflow January 2, 2025 11:14 — with GitHub Actions Inactive
@gngram
Copy link
Contributor Author

gngram commented Jan 2, 2025

Rebased to latest.

@gngram gngram requested a review from humaidq-tii January 3, 2025 07:07
@vunnyso vunnyso added the Needs Testing CI Team to pre-verify label Jan 3, 2025
@leivos-unikie
Copy link
Contributor

Tested debug and release disk image on Lenovo-X1

Lenovo-X1 release image

  • There is no access to terminal / command line. Terminal is not available in the app menu, neither can it be opened via right mouse click. Ssh to ghaf-host is disabled. I didn't find any way to verify if nix tooling and nix daemon are disabled.

Lenovo-X1 debug image

  • nix-gc.timer is active in all VMs, contrary to Intructions for Testing
NEXT                          LEFT LAST                          PASSED UNIT                         ACTIVATES
Wed 2025-01-08 00:00:00 UTC    14h -                                      - nix-gc.timer                 nix-gc.service
  • nix tooling seems to be available in every VM but systemctl status nix-daemon shows inactive (dead) status (unless running first e.g. nix-store --gc in that VM).
  • ci-test-automation passes, performance ok

@leivos-unikie leivos-unikie added the bug on Lenovo X1 Carbon Issues found on Lenovo X1 Carbon while checking this PR label Jan 7, 2025
@leivos-unikie
Copy link
Contributor

Tested that release-installer succeeds to install ghaf release version.

@johannarautanen
Copy link

Tested debug and release disk image on Orin AGX

Orin AGX release image:

  • There is no access to terminal / command line. Terminal is not available in the app menu.

Tried to create the release image according the https://ghaf-jenkins-controller-prod.northeurope.cloudapp.azure.com/job/ghaf-release-pipeline/2/ from October 2024, but there was no terminal available either. Rumors told that last time the terminal was seen on release image in summer 2024.

Orin AGX debug image:

  • nix-gc.timer is active in all VMs; host and net-vm
    Screenshot from 2025-01-08 11-11-39

  • Like in Lenovo-X1 the nix tooling seems to be available in every VM but systemctl status nix-daemon shows inactive (dead) status (unless running first e.g. nix-store --gc in that VM).

  • test automation cases were ok

@johannarautanen johannarautanen added bug on Orin AGX Issues found on NVIDIA Jetson AGX Orin while checking this PR and removed Needs Testing CI Team to pre-verify labels Jan 8, 2025
@gngram gngram force-pushed the pr__disable_nix_tooling branch from 15ea8ab to b1466e6 Compare January 20, 2025 13:03
@gngram gngram temporarily deployed to internal-build-workflow January 20, 2025 13:03 — with GitHub Actions Inactive
@gngram
Copy link
Contributor Author

gngram commented Jan 20, 2025

@johannarautanen and @leivos-unikie , please test it again. I have re-based it and fixed the issue.
I have updated the test steps also to imitate release flavor.

@leivos-unikie
Copy link
Contributor

leivos-unikie commented Jan 21, 2025

Tested again on lenovo-x1

Debug image built with the change (nix-setup disabled) imitating release image

  • nix tooling not available in ghaf-host or any VM
  • nix-daemon.service not found in ghaf-host or any VM

Debug image

  • nix-gc.timer is active only on ghaf-host
  • nix tooling available in ghaf-host and in all VMs
  • although nix tooling is available in ghaf-host and in every VM systemctl status nix-daemon shows inactive (dead) by default
  • and ci-test-automation is still passing and performance ok

- Disable nix tooling if development setup is not enabled
- Indirectly disables nix tooling in release build
- Enable automatic garbage collection in ghaf-host only

Signed-off-by: Ganga Ram <[email protected]>
@gngram gngram force-pushed the pr__disable_nix_tooling branch from b1466e6 to 9e93776 Compare January 21, 2025 08:40
@gngram gngram temporarily deployed to internal-build-workflow January 21, 2025 08:40 — with GitHub Actions Inactive
@leivos-unikie leivos-unikie removed the bug on Lenovo X1 Carbon Issues found on Lenovo X1 Carbon while checking this PR label Jan 21, 2025
@johannarautanen
Copy link

johannarautanen commented Jan 21, 2025

Checked with Orin AGX
Imitate release (nix-setup.enable = false;)

  • nix-tooling not available in host or net-vm
  • nix-daemon.service not found in ghaf-host
    When checking with the systemctl status nix-daemon in net-vm:
    Screenshot from 2025-01-21 12-52-27

Debug:

  • nix-gc.timer is only visible in ghaf-host
  • nix tooling available in ghaf-host and net-vm
  • And same as in x1: although nix tooling is available in ghaf-host and in every VM systemctl status nix-daemon shows inactive (dead) by default

@johannarautanen
Copy link

Checked with Orin NX

Imitate release (nix-setup.enable = false;)

  • nix-tooling not available in host or net-vm
  • nix-daemon.service not found in ghaf-host
    Same as with AGX, when checking with the systemctl status nix-daemon in net-vm:
    Screenshot from 2025-01-21 12-52-27

Debug:

  • nix-gc.timer is only visible in ghaf-host
  • nix tooling available in ghaf-host and net-vm
    And same as in x1: although nix tooling is available in ghaf-host and and net-vm status nix-daemon shows inactive (dead) by default

@leivos-unikie leivos-unikie added the Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon label Jan 21, 2025
@johannarautanen johannarautanen added Tested on Orin AGX This PR has been tested on NVIDIA Jetson AGX Orin Tested on Orin NX This PR has been tested on NVIDIA Jetson NX Orin and removed bug on Orin AGX Issues found on NVIDIA Jetson AGX Orin while checking this PR labels Jan 21, 2025
@ktusawrk
Copy link
Collaborator

Failed ghaf-pre-merge-pipeline builds 326 and 329 are not related to this PR. There was a glitch in the pre-merge-pipeline itself. These failed builds do not prevent merging this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tested on Lenovo X1 Carbon This PR has been tested on Lenovo X1 Carbon Tested on Orin AGX This PR has been tested on NVIDIA Jetson AGX Orin Tested on Orin NX This PR has been tested on NVIDIA Jetson NX Orin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants