scylladb / scylla-operator

The Kubernetes Operator for ScyllaDB
https://operator.docs.scylladb.com/
Apache License 2.0
323 stars 159 forks source link

operator mistakenly transforms key-only Scylla binary args to be key=value mapping which leads to Scylla start failure #991

Open vponomaryov opened 2 years ago

vponomaryov commented 2 years ago

Describe the bug Scylla operator supports setting scylla binary args via the scyllaArgs option in the scyllacluster CR spec. And if we try to set the --abort-on-seastar-bad-alloc option with it then we get following error on the attempt to start first Scylla member:

FATAL: Exception during startup, aborting: boost::wrapexcept<boost::program_options::invalid_command_line_syntax> (the argument for option '--abort-on-seastar-bad-alloc' should follow immediately after the equal sign)

The proof that it must not have options can be made if we do it and try to run Scylla again:

error: option '--abort-on-seastar-bad-alloc' does not take any arguments 

So, the problem here is that operator mistakenly tries to make all the options be mapping of key=value pairs. But it must keep key-only options as is. Where --abort-on-seastar-bad-alloc is one of such options.

To Reproduce Steps to reproduce the behavior:

  1. Deploy operator
  2. Define following option in the spec of the scyllacluster instance: scyllaArgs: '--abort-on-seastar-bad-alloc'
  3. See error

Expected behavior It must be the same way as in the VM deployment:

Jun 17 09:51:00 longevity-large-partitions-3h-dev-db-node-880bb304-1 scylla[10258]: command used: "/usr/bin/scylla --blocked-reactor-notify-ms 100 --abort-on-lsa-bad-alloc 1 --abort-on-seastar-bad-alloc --abort-on-internal-error 1 --abort-on-ebadf 1 --enable-sstable-key-validation 1 --smp 5 --log-to-syslog 1 --log-to-stdout 0 --default-log-level info --network-stack posix --io-properties-file=/etc/scylla.d/io_properties.yaml --cpuset 0-7 --lock-memory=1"
Jun 17 09:51:00 longevity-large-partitions-3h-dev-db-node-880bb304-1 scylla[10258]: parsed command line options: [blocked-reactor-notify-ms, (positional) 100, abort-on-lsa-bad-alloc: 1, abort-on-seastar-bad-alloc, abort-on-internal-error: 1, abort-on-ebadf: 1, enable-sstable-key-validation: 1, smp, (positional) 5, log-to-syslog, (positional) 1, log-to-stdout, (positional) 0, default-log-level, (positional) info, network-stack, (positional) posix, io-properties-file: /etc/scylla.d/io_properties.yaml, cpuset, (positional) 0-7, lock-memory: 1]

Environment:

scylla-operator-bot[bot] commented 1 week ago

The Scylla Operator project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

/lifecycle stale