Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

Build rust rpm's #2443

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Build rust rpm's #2443

wants to merge 1 commit into from

Conversation

johnsonw
Copy link
Contributor

@johnsonw johnsonw commented Dec 17, 2020

The sccahe installation from crates is not functioning properly on
centos 7. Instead, pull the repo down and build sccache in release mode
with no default features. This fixes the issue. Additionally, add a
"--clean" flag that will rebuild all of the rpms. This is useful if only
a specific rpm is being built but others also need to be built to ensure
that db migrations are baked into each service. The operation will still
be fairly quick since sccache will be used.

Signed-off-by: johnsonw wjohnson@whamcloud.com


This change is Reviewable

The sccahe installation from crates is not functioning properly on
centos 7. Instead, pull the repo down and build sccache in release mode
with no default features. This fixes the issue. Additionally, add a
"--clean" flag that will rebuild all of the rpms. This is useful if only
a specific rpm is being built but others also need to be built to ensure
that db migrations are baked into each service. The operation will still
be fairly quick since sccache will be used.

Signed-off-by: johnsonw <wjohnson@whamcloud.com>
@johnsonw johnsonw self-assigned this Dec 17, 2020
@johnsonw johnsonw added the chore label Dec 17, 2020
@johnsonw johnsonw requested a review from a team December 17, 2020 05:58
cd /integrated-manager-for-lustre \
&& [ "$1" = "--clean" ] && cargo clean || echo "Attempting to build rpm's without cleaning." \
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it clean sscache as well? This seems a bit unexpected, since cargo doesn't know about sscache (or does it?).

Copy link
Contributor Author

@johnsonw johnsonw Dec 17, 2020

Choose a reason for hiding this comment

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

In my case, I made a change to one of the migrations and changed a small piece of code in one of the services. When building the rpm's, cargo just saw that one service was changed, so when it built the rpms, it used the cache data for the other services. This ultimately led to the other services having the previous SQL migrations baked into them while the service I made a change to baked in the new migration script. So when I installed the rpms, one service had a different migration baked into it, which created a race condition to run the SQL migrations and ultimately caused the services to crash. What this does is clean out cargo to ensure the other services are also built. Sccache will still be used to speed up compile time.

@jgrund
Copy link
Member

jgrund commented Dec 17, 2020

The sccahe installation from crates is not functioning properly on centos 7.

What is the issue?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants