Skip to content

Commit bfc1bb1

Browse files
authored
copy license file to data dir in install2 like install1 (#1754)
1 parent 6a40419 commit bfc1bb1

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

cmd/installer/cli/install2.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,12 @@ func runInstall2(cmd *cobra.Command, args []string, name string, flags Install2C
183183
return err
184184
}
185185

186+
logrus.Debugf("copy license file to %s", flags.dataDir)
187+
if err := copyLicenseFileToDataDir(flags.licenseFile, flags.dataDir); err != nil {
188+
// We have decided not to report this error
189+
logrus.Warnf("unable to copy license file to %s: %v", flags.dataDir, err)
190+
}
191+
186192
logrus.Debugf("configuring sysctl")
187193
if err := configutils.ConfigureSysctl(); err != nil {
188194
return fmt.Errorf("unable to configure sysctl: %w", err)

e2e/scripts/single-node-install2.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,9 @@ main() {
149149
exit 1
150150
fi
151151

152-
# TODO: enable this once we cache the license in the data dir in install2
153-
# if ! ensure_license_in_data_dir; then
154-
# exit 1
155-
# fi
152+
if ! ensure_license_in_data_dir; then
153+
exit 1
154+
fi
156155

157156
echo "kotsadm logs"
158157
kubectl logs -n kotsadm -l app=kotsadm --tail=50 || true

0 commit comments

Comments
 (0)