Skip to content
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

[CI:DOCS] containers.conf: database_backend #1422

Merged
merged 1 commit into from
Apr 19, 2023

Conversation

vrothberg
Copy link
Member

Document the database_backend option which has been added earlier but intentionally left undocumented to avoid the impression sqlite would be ready for prime-time.

@mheon @baude @giuseppe PTAL

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 17, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vrothberg

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

docs/containers.conf.5.md Outdated Show resolved Hide resolved
@rhatdan
Copy link
Member

rhatdan commented Apr 17, 2023

LGTM
@containers/podman-maintainers PTAL

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

Maybe make it clear that users should run podman system reset before switching? We shouldn't allow using both db's at once.

@mheon
Copy link
Member

mheon commented Apr 17, 2023 via email

@vrothberg
Copy link
Member Author

Maybe make it clear that users should run podman system reset before switching? We shouldn't allow using both db's at once.

I think that's rather something Podman should do/decide on. Podman could error out when there's already an existing DB that doesn't match the user/config selection.

@Luap99
Copy link
Member

Luap99 commented Apr 17, 2023

Switching back and forth doesn’t require a reset, so as long as we document
the CLI flag as well I don’t think it’s necessary to recommend system reset.

Well sure it doesn't have to, changing the network backend never required it either.
For starters changing it will immediately loose all access to your containers unless you change it back.
My point is that things can go bad very quickly. Just one example when I create a volume with the same name in both dbs then I delete it in one of them it deletes the data for both since they use the exact same underlying path.

Also there is zero information about what podman actually stores in the db. I loose access to containers, pods and volumes. However images and networks are shared for both because these are not stored in the db. As a naive user this is very confusing.

I think that's rather something Podman should do/decide on. Podman could error out when there's already an existing DB that doesn't match the user/config selection.

Yes that is what I would prefer but it also boils down to: you should do a system reset before switching this config option.

@rhatdan
Copy link
Member

rhatdan commented Apr 17, 2023

I think you can document what is different in the man page as well as containers.conf.

@rhatdan
Copy link
Member

rhatdan commented Apr 17, 2023

And then recommend the reset to permanently make the changes. Or at lease remove all networks and containers.

@vrothberg
Copy link
Member Author

Let's just state that "podman system reset may be necessary when changing from one backend to another"

@vrothberg
Copy link
Member Author

I do not think we should document which data is being stored in the DB. That is an internal that IMO no user should let their workloads rely on. The bottom line should always be that users need to expect to lose all their data when switching the backend/run system reset.

@rhatdan
Copy link
Member

rhatdan commented Apr 18, 2023

Fine document that without resetting the storage then the system will not work correctly and executing the podman system reset is the best option.

@vrothberg
Copy link
Member Author

Done, PTAL

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM

@rhatdan
Copy link
Member

rhatdan commented Apr 18, 2023

Can you add

patch

@vrothberg
Copy link
Member Author

Done, thanks!

pkg/config/containers.conf Outdated Show resolved Hide resolved
Document the `database_backend` option which has been added earlier but
intentionally left undocumented to avoid the impression sqlite would be
ready for prime-time.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
@vrothberg
Copy link
Member Author

merge me

@Luap99
Copy link
Member

Luap99 commented Apr 19, 2023

/lgtm

@openshift-merge-robot openshift-merge-robot merged commit 536bbe5 into containers:main Apr 19, 2023
@vrothberg vrothberg deleted the db-docs branch April 19, 2023 15:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants