Skip to content

Commit

Permalink
Merge pull request #185 from donpenney/fix-seed-manifest-location
Browse files Browse the repository at this point in the history
Update location of seed manifest file in post-pivot
  • Loading branch information
openshift-merge-bot[bot] authored Dec 18, 2023
2 parents e3f70d5 + 6460a90 commit 3e4e0e3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ibu-imager/postpivot/postpivot.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (p *PostPivot) PostPivotConfiguration(ctx context.Context) error {
}

p.log.Info("Reading seed info")
seedClusterInfo, err := utils.ReadClusterInfoFromFile(path.Join(p.workingDir, common.SeedManifest))
seedClusterInfo, err := utils.ReadClusterInfoFromFile(path.Join(common.SeedDataDir, common.ClusterInfoFileName))
if err != nil {
return fmt.Errorf("failed to get seed info from %s, err: %w", "", err)
}
Expand Down
5 changes: 4 additions & 1 deletion internal/clusterconfig/clusterconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,10 @@ func TestClusterConfig(t *testing.T) {
if err := os.MkdirAll(filepath.Join(tmpDir, common.OptOpenshift), 0o700); err != nil {
t.Errorf("failed to create opt dir, error: %v", err)
}
err = utils.MarshalToFile(seedManifestData, filepath.Join(tmpDir, common.OptOpenshift, common.SeedManifest))
if err := os.MkdirAll(filepath.Join(tmpDir, common.SeedDataDir), 0o700); err != nil {
t.Errorf("failed to create %s dir, error: %v", common.SeedDataDir, err)
}
err = utils.MarshalToFile(seedManifestData, filepath.Join(tmpDir, common.SeedDataDir, common.ClusterInfoFileName))
if err != nil {
t.Errorf("failed to create seed manifest, error: %v", err)
}
Expand Down
1 change: 0 additions & 1 deletion internal/common/consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const (
InstallationConfigurationFilesDir = "/usr/local/installation_configuration_files"
OptOpenshift = "/opt/openshift"
SeedDataDir = "/var/seed_data"
SeedManifest = "seed_manifest.json"
CertsDir = "certs"
ClusterConfigDir = "cluster-configuration"
ClusterInfoFileName = "manifest.json"
Expand Down

0 comments on commit 3e4e0e3

Please sign in to comment.