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

Enable local SSD formatting solution to set POSIX permissions #2863

Merged

Conversation

tpdownes
Copy link
Member

@tpdownes tpdownes commented Aug 2, 2024

#2720 did not expose the ability to set filesystem permissions to the blueprint developer. This PR adds that functionality. Tested with

---
blueprint_name: startup-vm-instance

vars:
  project_id:  ## Set project id here
  deployment_name: testfix
  region: us-east4
  zone: us-east4-b
  bandwidth_tier: gvnic_enabled

deployment_groups:
- group: first
  modules:
  - id: network1
    source: modules/network/vpc
  - id: script
    source: modules/scripts/startup-script
    settings:
      local_ssd_filesystem:
        mountpoint: /mnt/ssd
        permissions: 1777
  - id: vm1
    source: modules/compute/vm-instance
    use:
    - network1
    - script
    settings:
      machine_type: n2d-standard-16
      disk_type: pd-balanced
      local_ssd_count: 2
      instance_image:
        project: cloud-hpc-image-public
        family: hpc-rocky-linux-8

Specifically:

  1. I provisioned the blueprint above and observed the correct permissions.
  2. I modified the blueprint to comment out the permissions, re-deployed and then ran systemctl start google-startup-scripts.service. The permissions changed to 0755 (the correct default)
  3. I tested values that are not 3 or 4 digit octals and got terraform validation errors.

Submission Checklist

Please take the following actions before submitting this pull request.

  • Fork your PR branch from the Toolkit "develop" branch (not main)
  • Test all changes with pre-commit in a local branch #
  • Confirm that "make tests" passes all tests
  • Add or modify unit tests to cover code changes
  • Ensure that unit test coverage remains above 80%
  • Update all applicable documentation
  • Follow Cluster Toolkit Contribution guidelines #

@tpdownes tpdownes requested a review from alyssa-sm August 2, 2024 21:15
@tpdownes tpdownes added the release-module-improvements Added to release notes under the "Module Improvements" heading. label Aug 2, 2024
@alyssa-sm alyssa-sm assigned tpdownes and unassigned alyssa-sm Aug 2, 2024
@tpdownes tpdownes enabled auto-merge August 2, 2024 21:18
@tpdownes tpdownes merged commit 1d7dc33 into GoogleCloudPlatform:develop Aug 2, 2024
9 of 53 checks passed
@tpdownes tpdownes deleted the localssd_posix_perms branch August 2, 2024 21:27
@nick-stroud nick-stroud mentioned this pull request Aug 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-module-improvements Added to release notes under the "Module Improvements" heading.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants