-
Notifications
You must be signed in to change notification settings - Fork 114
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
[CHEF-10698] [WIP] Bug fix for cross-device link issue #8415
Conversation
👷 Deploy Preview for chef-automate processing.
|
@@ -56,7 +56,7 @@ func (srs *SystemResourcesServiceImpl) GetSystemResourcesForDeployment(nodeType | |||
rootFreeSpaceCheck := srs.CheckFreeDiskSpaceOfDir("/", constants.ROOT_FREE_DISK_IN_PER, constants.ROOT_FREE_DISK_IN_GB, "/(root volume)") | |||
srsResponse.Checks = append(srsResponse.Checks, *rootFreeSpaceCheck) | |||
|
|||
tmpDirPermissionCheck := srs.CheckPermissionOfDir("/tmp", constants.TMP_DIR_REQUIRED_PERMISSION, "/tmp permission") | |||
tmpDirPermissionCheck := srs.CheckPermissionOfDir("/hab/tmp", constants.TMP_DIR_REQUIRED_PERMISSION, "/hab/tmp permission") |
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.
remove that
@@ -44,7 +44,6 @@ var NEW_BIN_DIR = "/hab/pkgs/core/postgresql13/13.5/20220311204618/bin" | |||
const ( | |||
AUTOMATE_VERSION = "3" | |||
NEXT_AUTOMATE_VERSION = "4" | |||
AUTOMATE_PG_MIGRATE_LOG_DIR = "/tmp" | |||
OLD_PG_VERSION = "9.6" | |||
OLD_PG_DATA_DIR = "/hab/svc/automate-postgresql/data/pgdata" | |||
NEW_PG_DATA_DIR = "/hab/svc/automate-postgresql/data/pgdata13" |
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.
we can remove the migration_pg.go changes
this will be for upgrade from 2.x to 3.x
@@ -398,8 +398,7 @@ func runGatherLogsLocalCmd(outfileOverride string, logLines uint64) error { | |||
// TODO: This might not always be the right choice, we should look into | |||
// assigning this dynamically or allow a config flag. Right now /tmp | |||
// works on our target distros and this is just an emergency fallback | |||
stagingDir := "/tmp" | |||
archiveRoot, err := createTempDir(stagingDir, "log-gathering") |
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.
we can remove this as well
gather-logs command is writing the logs into the /tmp
that automatically cleanup
@@ -41,14 +41,14 @@ const RELEASE_AND_VERSION_PATTERN = `.*-(\d+\.\d+\.*\d*)-(\d{14})-.*\.hart$` | |||
|
|||
const ( | |||
FRONTEND_COMMAND = ` | |||
sudo chef-automate config %s /tmp/%s; |
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.
we can revert that change
@@ -63,7 +63,7 @@ const ( | |||
|
|||
GET_FRONTEND_CONFIG = `echo "y" | sudo chef-automate config show %s` | |||
|
|||
PRE_FLIGHT_CHECK = `cd /tmp; |
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.
we can revert that change
export TIMESTAMP=$(date +'%s'); | ||
sudo mv /etc/chef-automate/config.toml /etc/chef-automate/config.toml.$TIMESTAMP; | ||
sudo chef-automate config show > sudo /etc/chef-automate/config.toml` | ||
|
||
BACKEND_COMMAND = ` | ||
export TIMESTAMP=$(date +"%s"); | ||
echo "yes" | sudo hab config apply automate-ha-%s.default $(date '+%s') /tmp/%s; |
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.
we can revert that change
🔩 Description: What code changed, and why?
The code related to writing to temporary files, because there was an issue with several clients. We are aiming to use
/hab/tmp
for writing to temporary files from now on.⛓️ Related Resources
https://chefio.atlassian.net/browse/CHEF-10698
👍 Definition of Done
The error does not appear when using automate-cli commands.
👟 How to Build and Test the Change
✅ Checklist
All PRs must tick these:
With occasional exceptions, all PRs from Progress employees must tick these:
make spell
in any component directory)All PRs from Progress employees should tick these if appropriate:
Please add a note next to any checkbox above if you are NOT ticking it.
📷 Screenshots, if applicable