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

Modules with a '.' in their name can not be deleted #967

Open
GerrySeidman opened this issue Jan 7, 2025 · 1 comment · May be fixed by #969
Open

Modules with a '.' in their name can not be deleted #967

GerrySeidman opened this issue Jan 7, 2025 · 1 comment · May be fixed by #969
Assignees

Comments

@GerrySeidman
Copy link

GerrySeidman commented Jan 7, 2025

Modules with a '.' in their name can not be deleted

FAILING Example with module named "test.1"

  • Created Module "test.1" with the below YAML
  • Deleted Module "test.1"
  • KMM properly deletes the kmods on the nodes
  • KMM does NOT remove the finalizer from the Module (oc delete module hangs)
    • The finalizer is never being removed from the module object.
  • NOTE: Manually (ie via 'oc edit module' ) removing the finalizer was the only way to delete the module
apiVersion: kmm.sigs.x-k8s.io/v1beta1
kind: Module
metadata:
  name: test.1
spec:
  moduleLoader:
    container:
      modprobe:
        moduleName: yfs
      kernelMappings:
        - regexp: '^.+\_4\.x86_64$'
          containerImage: example.com/test-module

Working Example with module named "test-1"

  • Created Module "test-1" with the below YAML
  • Deleted Module "test-1"
  • KMM properly deletes the kmods on the nodes
  • KMM properly deletes the module
apiVersion: kmm.sigs.x-k8s.io/v1beta1
kind: Module
metadata:
  name: test-1
spec:
  moduleLoader:
    container:
      modprobe:
        moduleName: yfs
      kernelMappings:
        - regexp: '^.+\_4\.x86_64$'
          containerImage: example.com/test-module

Note: The admission control for other object types (such as Pod) will rejects names containing a '.' in their. This issue came up for us because a change in our scripting was generating Module's with '.'s in their name. This would have been caught earlier if the admission controller for modules rejected it upon creation.

Proposed Solutions

  • Add this to the admission controller check for Modules (preferred)
  • Properly remove the finalizer for Modules with a '.' in their names
@GerrySeidman GerrySeidman changed the title Modules with a '.' in their can not be deleted Modules with a '.' in their name can not be deleted Jan 7, 2025
@GerrySeidman
Copy link
Author

Quirky observation

  • Daemonsets allow '.' in their names.

    • The pods they create have '.' in their names
  • Deployments allow '.' in their names.

    • However a warning is printed when they are created
    • The pods they create have '.' in their names

    The important thing for Modules is that they either fail on creation or allow created modules to be properly deleted

@ybettan ybettan self-assigned this Jan 8, 2025
@ybettan ybettan linked a pull request Jan 8, 2025 that will close this issue
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 a pull request may close this issue.

2 participants