Skip to content

Jlo/posix default#17516

Open
johannlombardi wants to merge 6 commits intomasterfrom
jlo/posix-default
Open

Jlo/posix default#17516
johannlombardi wants to merge 6 commits intomasterfrom
jlo/posix-default

Conversation

@johannlombardi
Copy link
Contributor

@johannlombardi johannlombardi commented Feb 5, 2026

DAOS-17946 cont: use POSIX container type by default in daos utility

Change the default to POSIX container in the daos utility when no container
type is specified on the command line.

Signed-off-by: Johann Lombardi johann.lombardi@hpe.com

Change the default to POSIX container in the daos utility when no container
type is specified on the command line.

Signed-off-by: Johann Lombardi <johann.lombardi@hpe.com>
Signed-off-by: Johann Lombardi <johann.lombardi@hpe.com>
@johannlombardi johannlombardi requested review from a team as code owners February 5, 2026 15:46
@github-actions
Copy link

github-actions bot commented Feb 5, 2026

Errors are component not formatted correctly,Ticket number prefix incorrect,PR title is malformatted. See https://daosio.atlassian.net/wiki/spaces/DC/pages/11133911069/Commit+Comments,Unable to load ticket data
https://daosio.atlassian.net/browse/Jlo/posix

# method when creating/destroying containers
self.path = BasicParameter(None)
self.type = BasicParameter(None)
self.type = BasicParameter("NONE")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wrote a script to find all the configs where we do not specify the type, and there are 42 of them. Although it's more changes, I think it's better overall . Are you okay with me pushing that instead of setting the default here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, please feel free to push it in this PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Pushed. It should cover almost all the cases, if not all

# method when creating/destroying containers
self.path = BasicParameter(None)
self.type = BasicParameter(None)
self.type = BasicParameter("NONE")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving this set as the type None results in a daos container create command that excludes the --type argument. Setting the default to the "NONE" string results in a daos container create command with the --type=NONE argument. Based upon the commit message don't we want thew first option, where the --type argument is excluded?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If --type is excluded, the default container type will now be POSIX.
So if we leave this as None we will need to update all tests that currently create a container but do not specify a type. And IMO that's what we should do, instead of setting a different default value here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, it will pass the string "NONE" which will restore the old default. I am fine with Dalton's approach.

Copy link
Contributor

@kjacque kjacque Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little confused by the approach of changing all the config files. Do the tests actually need the type to be NONE for the purpose of the test itself, or is it some outdated expectation? If the latter, shouldn't the tests be fixed to expect the new default? (Or if it doesn't matter to the test, maybe not compare the layout type at all?)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests using NONE type are working with non-POSIX containers. I.e. using the daos_ API directly. So they don't want to use POSIX. But as a side note, I do think most of those tests should eventually be updated to use POSIX instead

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see. That makes sense if the test requires direct API access. As an aside, I think the NONE type is a bit of a misnomer--should be called "API" or something like that.

Signed-off-by: Dalton Bohning <dalton.bohning@hpe.com>
Features: container

Signed-off-by: Dalton Bohning <dalton.bohning@hpe.com>
Features: container

Signed-off-by: Dalton Bohning <dalton.bohning@hpe.com>
container:
cont_types:
- ""
- "NONE"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we still test "" in addition to "NONE"?

Suggested change
- "NONE"
- ""
- "NONE"

We also might want to clarify https://github.com/daos-stack/daos/blob/master/src/tests/ftest/dfuse/container_type.py#L43, now that "NONE" should create a POSIX container.

Either way https://github.com/daos-stack/daos/blob/master/src/tests/ftest/dfuse/container_type.py#L48-L49 will need to be updated to support setting "NONE".

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed the python, but the purpose of this test is to verify dfuse behavior with POSIX and non-POSIX, so I don't think there is any need to create a container with an empty type

Features: container

Signed-off-by: Dalton Bohning <dalton.bohning@hpe.com>
Comment on lines +401 to +406
// Use POSIX container type by default, if none is specified
typeProp := createPropList.MustAddEntryByType(daos.ContainerPropLayoutType)
if hasType() {
typeProp := createPropList.MustAddEntryByType(daos.ContainerPropLayoutType)
typeProp.SetValue(uint64(cmd.Type.Type))
} else {
typeProp.SetValue(uint64(C.DAOS_PROP_CO_LAYOUT_POSIX))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be better to add these C layout types as Go constants in src/control/lib/daos/container_property.go, and then use the constant here.

I wouldn't block on this -- we're still making some changes around the way we organize the cgo code.

# method when creating/destroying containers
self.path = BasicParameter(None)
self.type = BasicParameter(None)
self.type = BasicParameter("NONE")
Copy link
Contributor

@kjacque kjacque Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little confused by the approach of changing all the config files. Do the tests actually need the type to be NONE for the purpose of the test itself, or is it some outdated expectation? If the latter, shouldn't the tests be fixed to expect the new default? (Or if it doesn't matter to the test, maybe not compare the layout type at all?)

@daosbuild3
Copy link
Collaborator

@daosbuild3
Copy link
Collaborator

@daosbuild3
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants