From 825448825c56fe6c240458fc9a29f931c0ee6cc1 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 24 Mar 2020 08:48:27 +0100 Subject: [PATCH] examples: rbd/storageclass.yaml causes Python excetion with yamllint While running the 'make test' target and have 'yamllint' available, the test fails with the following exception: yamllint -s -d {extends: default, rules: {line-length: {allow-non-breakable-inline-mappings: true}},ignore: charts/*/templates/*.yaml} ./examples/rbd/storageclass.yaml Traceback (most recent call last): File "/usr/local/bin/yamllint", line 11, in sys.exit(run()) File "/usr/local/lib/python3.6/site-packages/yamllint/cli.py", line 181, in run problems = linter.run(f, conf, filepath) File "/usr/local/lib/python3.6/site-packages/yamllint/linter.py", line 237, in run content = input.read() File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1947: ordinal not in range(128) The quotes used in the comments seem to be non-ascii characters. Replacing these with standard " makes the test pass again. This problem occurred while running tests in a container based on the Ceph image (CentOS-7) with Python 3. Travis CI might still use Python 2 for yamllint, and hide the problem. Signed-off-by: Niels de Vos --- examples/rbd/storageclass.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/rbd/storageclass.yaml b/examples/rbd/storageclass.yaml index f12f1aad4..b5c58f2ac 100644 --- a/examples/rbd/storageclass.yaml +++ b/examples/rbd/storageclass.yaml @@ -40,8 +40,8 @@ parameters: # mounter: rbd-nbd # Instruct the plugin it has to encrypt the volume - # By default it is disabled. Valid values are “true” or “false”. - # A string is expected here, i.e. “true”, not true. + # By default it is disabled. Valid values are "true" or "false". + # A string is expected here, i.e. "true", not true. # encrypted: "true" # Use external key management system for encryption passphrases by specifying