Skip to content

Fix IP cache purge for IPv4 and IPv6, enhance command parsing - #1075

Open
cvaroqui wants to merge 13 commits into
opensvc:mainfrom
cvaroqui:main
Open

Fix IP cache purge for IPv4 and IPv6, enhance command parsing#1075
cvaroqui wants to merge 13 commits into
opensvc:mainfrom
cvaroqui:main

Conversation

@cvaroqui

Copy link
Copy Markdown
Member

No description provided.

* a empty buff condition needed to be tested before addressing
  the 0 index of a strings.Fields(buff).

* glob patterns to list files named after ip could only match
  ipv4. Use {*.*.*.*,*:*} to catch ipv6 too.
Declare a commoncmd function to factorize the arg0 parsing and
command options.RID setting.

All driver groups commandsets are supported.
To be able to document a "Arguments:" section after "Use:".
The normal template has no provision for args doc, leaving the
developper only with the Long command field to explain args, but
the Long is printed before "Use:". i.e. args details before
summary, confusing.

Example with this patch:

	# om svc1 container start -h
	Start a container resource. Equivalent to 'instance start --rid container#<ID>'.

	Usage:
	  start [ID] [FLAGS]

	Arguments:
	  ID  A container resource index.

	Flags:
	      --color string        output colorization yes|no|auto (default "auto")
        ...
And remove --rid flag from all drvgroup commands to avoid
complex merging/override policies and sanity checks to avoid
incompatible pos arg and --rid flag (e.f. container ls --rid ip)
Example:

	$ om system/sec/ceph key ls *ring
	ceph.opensvc.com.admin.keyring

Documented as:

	$ om system/sec/ceph key ls -h
	Usage:
	  list [PATTERN] [FLAGS]

	Arguments:
	  PATTERN  A fnmatch key name filter.

	Flags:
	      --color string       output colorization yes|no|auto (default "auto")
	  -h, --help               help for list
	      --ignore-not-found   allow empty object selections
	  -o, --output string      output format json|flat|auto|tab=<header>:<jsonpath>,... (default "auto")
	  -s, --selector string    execute on a list of objects

This patch hides the --match flag used for that role so far, so
backward compat and tests are ok.
Lost by commit c79f275 that
added a custom help template not supporting command groups.
* add|change|edit|decode NAME
* remove NAME...

And add the `rm` alias for `remove`.
Example:

	om sec/ceph1 key rename keyring keyring.2026
Example:

    om sec/ceph1 key install keyring
And tidy key commandset short help messages.
This kw references a datastore key holding a ceph.conf content.
This key is installed as a /run file used to add a -c flag to
rbd commands.

Example:

	[disk#2]
	type = rados
	name = {fqdn}-disk2
	size = 100m
	keyring = from system/sec/ceph key ceph.opensvc.com.admin.keyring
	config = from system/sec/ceph key ceph.conf
In this case the "rbd" default pool must be prepended to the
normalized spec before comparing with RBDMap data and when
formatting the device path (e.g. /dev/rbd/rbd/myname).
Grouped disks have atomic snapshots.

* Do the grouping in provision, ungrouping in unprovision
* Create the group if necessary
* Drop the group if unused
* Make resource status report grouping issues
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 this pull request may close these issues.

1 participant