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

Move migrations from small private partition to data partition #818

Merged
merged 2 commits into from
Mar 3, 2020

Conversation

tjkirch
Copy link
Contributor

@tjkirch tjkirch commented Mar 3, 2020

commit bd20cf991a3611d75bc2a3975410ed31196e1943
Author: Tom Kirchner <[email protected]>
Date:   Tue Mar 3 12:07:21 2020 -0800

Fix migration tmpfiles config to create directory

There are no factory files to copy.  This had been failing, but we didn't
notice because the os package also created the directory.
commit 52f8bf7b98d92c4b481e207acc8fb57f9b51ca9c
Author: Tom Kirchner <[email protected]>
Date:   Tue Mar 3 09:44:46 2020 -0800

Move migrations from small private partition to data partition

The private partition is very tight on space, and we could easily reach a point
where we weren't able to download migrations and accomplish an update.  The
private partition is used for the data store, so there's also contention
between those two critical functions.  Storing migrations on the larger data
partition takes a bit of space away from the user, but seems a reasonable
compromise to allow them to upgrade.

Rather than update the path in os.spec, we remove it, because it inaccurately
reflected the idea that we control the directory at build time, when in fact
it's created and populated at runtime.

Note: if we need any migrations for 0.3.1, we'll need a mechanism for downgrades to 0.3.0 to be able to find migrations that were downloaded to this new path. My suggestion is a 0.3.0->0.3.1 migration that creates a symlink from the old to the new on upgrade to 0.3.1; that would mean only customers who had run 0.3.0 see any effect. Ben suggested a tmpfiles entry to create the symlink, which would have the same effect, but apply to all machines.

Testing done:

We don't have any migrations right now, and this is a simple change, so I just did a build, checked that the path was actually changed, and confirmed that the migrator unit file pointed at it.

@tjkirch tjkirch requested review from iliana and bcressey March 3, 2020 18:12
packages/os/os.spec Outdated Show resolved Hide resolved
packages/os/migration-tmpfiles.conf Outdated Show resolved Hide resolved
The private partition is very tight on space, and we could easily reach a point
where we weren't able to download migrations and accomplish an update.  The
private partition is used for the data store, so there's also contention
between those two critical functions.  Storing migrations on the larger data
partition takes a bit of space away from the user, but seems a reasonable
compromise to allow them to upgrade.

Rather than update the path in os.spec, we remove it, because it inaccurately
reflected the idea that we control the directory at build time, when in fact
it's created and populated at runtime.
@tjkirch
Copy link
Contributor Author

tjkirch commented Mar 3, 2020

This push removes the directory ownership from os.spec, and renames the directory to bottlerocket-migrations, per @bcressey.

There are no factory files to copy.  This had been failing, but we didn't
notice because the os package also created the directory.
@tjkirch
Copy link
Contributor Author

tjkirch commented Mar 3, 2020

This push adds a commit fixing the tmpfiles mode for the migration directory. It was set to copy from the factory directory, which was failing, but we didn't notice because the os spec also created the directory.

Talked with bcressey offline about the updated entries for the tmpfiles configuration.

I confirmed that tmpfiles is working and the directory exists, with this.

@tjkirch tjkirch requested a review from bcressey March 3, 2020 20:19
@tjkirch tjkirch merged commit 316ab30 into develop Mar 3, 2020
@tjkirch tjkirch deleted the move-migrations branch March 3, 2020 23:05
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.

3 participants