Uploaded image for project: 'CoreOS OCP'
  1. CoreOS OCP
  2. COS-2701

[coreos/rpm-ostree] Parse Spaces in `kargs` Input

XMLWordPrintable

    • Upstream
    • 3
    • False
    • Hide

      None

      Show
      None
    • False
    • 250 - Core Packages
    • 0

      [2125942565] Upstream Reporter: Cheng Zhang
      Upstream issue status: Closed
      Upstream description:

          1. Describe the bug

      When send in multiple kargs input in a single string, the `kargs` seems to treat it as a single key value pair. For example run `rpm-ostree karg --delete "init_on_alloc=1 init_on_free=1"` will delete neither parameter, and `rpm-ostree karg --append-if-missing "init_on_alloc=1 init_on_free=1"` will duplicate these two kargs even when they exists

          1. Reproduction steps

      1. run `rpm-ostree karg --append "init_on_alloc=1 init_on_free=1"`, notice that `init_on_alloc=1 init_on_free=1` gets added to kargs
      2. run `rpm-ostree karg --append-if-missing "init_on_alloc=1 init_on_free=1"`, will duplicate these two kargs even when they are already present
      3. run `rpm-ostree karg --delete "init_on_alloc=1 init_on_free=1"` will give an error stating the argument is not found

          1. Expected behavior

      `rpm-ostree karg --append-if-missing "init_on_alloc=1 init_on_free=1" ` should not duplicate the kargs, and `rpm-ostree karg --delete "init_on_alloc=1 init_on_free=1"` should delete the kargs when they are present.

      Or at least raise an error/warning to the user about invalid input.

          1. Actual behavior

      Described in "Reproduction steps" section

          1. System details

      ```
      $ rpm-ostree version

      rpm-ostree:
      Version: '2024.2'
      Git: 3d9a8755ddd96395a5c1d02b42243eb54ea01193
      Features:

      • rust
      • compose
      • container
      • fedora-integration
        ```
          1. Additional information

      Related:

              hhei@redhat.com Huijing Hei
              upstream-sync Upstream Sync
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: