Repository navigation
cephadm: implement smb daemon core deployment - #54817
phlogistonjohn wants to merge 9 commits into
Conversation
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
9a1d897 to
8e41330
Compare
8e41330 to
308aa81
Compare
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
308aa81 to
2550696
Compare
|
jenkins test make check |
adk3798
left a comment
There was a problem hiding this comment.
This is still in draft, so not sure if you intended it to be reviewed, but I've done a pass over anyway. Didn't see anything that stuck out as an issue.
There was a problem hiding this comment.
why is it we need to do this twice when the arg has no value?
There was a problem hiding this comment.
Consider a list representing arguments like so:
a1 = ['--foo', '--speed=88', '--location=home', '--enable-flux']
Let's say we want to remove the --speed argument. If so we need to remove it's value too. idx first gets set to the position of an arg starting with --speed if speed is followed by the = OR if we do not expect the argument to have a value (has_value is false). We only need to remove the element at position idx
Thus a1 becomes:
idx = 1
a1 = ['--foo', '--speed=88', '--location=home', '--enable-flux']
del a1[idx]
# idx is now ['--foo', '--speed=88', '--location=home', '--enable-flux']
Now consider a2:
a2 = ['--foo', '--speed', '88', '--location=home', '--enable-flux']
In this case we actually want to remove --speed and 88 because 88 is the argument to speed but found in a seperate list value.
So therefore:
idx = 2
a2 = ['--foo', '--speed', '88', '--location=home', '--enable-flux']
del a2[idx]
del a2[idx]
# a2 is now ['--foo', '--speed', '--enable-flux']
I will try to add some comments on this to make it clearer.
There was a problem hiding this comment.
It would probably be a lot clearer if I change it to use slices instead. So I'll look into that too.
There was a problem hiding this comment.
I think I see what you mean. I was only thinking in terms of args using an "=" or that didn't have values at all. I was thinking how you would differentiate between something like --boolean-flag-with-no-value --other-flag and --flag-with-value <value>, but I guess the fact that you're replacing a specific flag that MUST have an = if it has a value (at least the replacement version of it, which is coming from us so can be controlled) then you know beforehand whether the flag will have a value and the issue goes away.
There was a problem hiding this comment.
Fixed. (I finally remembered to this this one)
There was a problem hiding this comment.
this seems to just be setting the /etc/hosts mount that we started doing to avoid name resolution issues caused by podman inserting its own stuff there. It definitely caused issues for things like iscsi and grafana, but not sure for smb.
There was a problem hiding this comment.
Exactly, plus I don't know if it needs to be replicated for the various sidecars or not.
There was a problem hiding this comment.
are there plans to make this configurable later? Seems the only place this gets set to an actual value that I can find is here where it's set to 6. I don't see it picking this up from the provided json or anything.
There was a problem hiding this comment.
Yes. This needs to be changed at some point.
2550696 to
ffeef73
Compare
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
ffeef73 to
8caddaf
Compare
Update the type annotations to allow passing pathlib.Path objects to the makedirs function. All the calls makedirs uses already can accept Path objects. This causes mypy to accept calling makedirs with a Path argument and Paths are nice. Signed-off-by: John Mulligan <[email protected]>
The prepare_data_dir method is a general way for classes to prepare the data dir (e.g. `/var/lib/ceph/$FSID/$DAEMON_TYPE.$DAEMON_ID`) before containers will use it. Signed-off-by: John Mulligan <[email protected]>
Instead of always climbing through an "if ladder" based on daemon type variables we will have the option of using the common method provided by container daemon form classes. This will initially be used by the smb daemon. I don't have the energy to refactor all the existing stuff at the moment. Signed-off-by: John Mulligan <[email protected]>
8caddaf to
030a5af
Compare
In the future, some sidecar containers will need to share namespaces with the primary container (or each other). Make it easy to set this up by creating a enable_shared_namespaces function and Namespace enum. Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
Add an incomplete but largely viable SMB/Samba container daemon form implementation to cephadm. Currently unused but it lays out some of the basics needed to create smb sharing using samba containers under cephadm orchestration. Signed-off-by: John Mulligan <[email protected]>
Enable the use of the SMB container daemon form class by importing, and thus registering, it. Note that the only way to invoke this feature is by hand rolling some JSON to feed to the `ceph _orch deploy` command. Connecting this with the cephadm mgr module is left as a future task. Signed-off-by: John Mulligan <[email protected]>
Signed-off-by: John Mulligan <[email protected]>
The not-a-real-fqdn hostname that the containers got were causing performance issues joining AD (and running testjoin and winbind). Define a virtual hostname that can be passed in from the service or automatically derived from the system's hostname. Signed-off-by: John Mulligan <[email protected]>
030a5af to
c924491
Compare
Depends on #54722
Add an incomplete but largely viable SMB/Samba container daemon form
implementation to cephadm. Currently difficult to use as there's no mgr support - but I have tested it by hand rolling some JSON to feed to the
ceph _orch deploycommand.See #55068 for some architectural description
Checklist
opened tracker ticketShow available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e