bottlerocket-os / bottlerocket-os/bottlerocket

Using `apiclient get` on a setting with a quoted key throws an error

Open
#3,387 0 comments 0 reactions 0 assignees View on GitHub
status/icebox type/bug
Dominant language
Rust
Stars
9.7k
Forks
586
Avg merge
1d 11h
Merged PRs (30d)
11

Description

**Image I'm using:**
`aws-k8s-1.27-1.14.3`

**What I expected to happen:**
With `apiclient` I was able to `set` a value where the setting key needed quoting by doing something like:

```
apiclient set settings.kernel.sysctl.\"user.max_user_namespaces\"= ...
```
However, when I tired to get a value using `apiclient` using a similar quoting, I would have expected this:

```
$ apiclient get settings.kernel.sysctl.\"user.max_user_namespaces\"
{
"settings": {
"kernel": {
"sysctl": {
"user.max_user_namespaces" : "16384"
}
}
}
}
```

**What actually happened:**

However, I got a this error message.

```
$ apiclient get settings.kernel.sysctl.\"user.max_user_namespaces\"
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: InvalidUri(InvalidUriChar)', /home/builder/.cargo/registry/src/index.crates.io-6f17d22bba15001f/hyper-unix-connector-0.2.2/src/lib.rs:44:39
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

**How to reproduce the problem:**
See above.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.