New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cephadm: implement smb daemon core deployment #54817
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
del args[idx] | ||
del args[idx] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is it we need to do this twice when the arg has no value?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
name: str, | ||
ns: Iterable[Namespace], | ||
) -> None: | ||
"""Update the args list to contain options that enable conatiner namespace |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT conatiner
-> container
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. (I finally remembered to this this one)
# XXX: is this needed? if so, can this be simplified | ||
if isinstance(ctx.container_engine, Podman): | ||
ctx.container_engine.update_mounts(ctx, volume_mounts) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly, plus I don't know if it needs to be replicated for the various sidecars or not.
custom_dns=custom_dns, | ||
domain_member=Features.DOMAIN.value in instance_features, | ||
clustered=Features.CLUSTERED.value in instance_features, | ||
samba_debug_level=6, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <jmulligan@redhat.com>
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 <jmulligan@redhat.com>
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 <jmulligan@redhat.com>
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 <jmulligan@redhat.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
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 <jmulligan@redhat.com>
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 <jmulligan@redhat.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
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 <jmulligan@redhat.com>
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 deploy
command.See #55068 for some architectural description
Checklist
opened tracker ticketShow available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard cephadm
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox
jenkins test windows
jenkins test rook e2e