Skip to content

Commit c9dc733

Browse files
committed
Move unsafe to beginning of names
1 parent 7b80508 commit c9dc733

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

runsc/boot/restore.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ func validateSpecs(oldSpecs, newSpecs map[string]*specs.Spec) error {
544544
return nil
545545
}
546546

547-
func (r *restorer) restore(l *Loader, skipSpecValidationUnsafe bool) error {
547+
func (r *restorer) restore(l *Loader, unsafeSkipRestoreSpecValidation bool) error {
548548
log.Infof("Starting to restore %d containers", len(r.containers))
549549

550550
// Create a new root network namespace with the network stack of the
@@ -650,7 +650,7 @@ func (r *restorer) restore(l *Loader, skipSpecValidationUnsafe bool) error {
650650
if err != nil {
651651
return fmt.Errorf("failed to pop container specs from checkpoint: %w", err)
652652
}
653-
if !skipSpecValidationUnsafe {
653+
if !unsafeSkipRestoreSpecValidation {
654654
if err := validateSpecs(oldSpecs, l.containerSpecs); err != nil {
655655
return fmt.Errorf("failed to validate restore spec: %w", err)
656656
}

runsc/config/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,9 +385,9 @@ type Config struct {
385385
// TestOnlySaveRestoreNetstack indicates netstack should be saved and restored.
386386
TestOnlySaveRestoreNetstack bool `flag:"TESTONLY-save-restore-netstack"`
387387

388-
// SkipRestoreSpecValidationUnsafe optionally skips validation of the container spec for restored
388+
// UnsafeSkipRestoreSpecValidation optionally skips validation of the container spec for restored
389389
// containers.
390-
SkipRestoreSpecValidationUnsafe bool `flag:"skip-restore-spec-validation-unsafe"`
390+
UnsafeSkipRestoreSpecValidation bool `flag:"unsafe-skip-restore-spec-validation"`
391391
}
392392

393393
func (c *Config) validate() error {

runsc/config/flags.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func RegisterFlags(flagSet *flag.FlagSet) {
105105
flagSet.Bool("enable-core-tags", false, "enables core tagging. Requires host linux kernel >= 5.14.")
106106
flagSet.String("pod-init-config", "", "path to configuration file with additional steps to take during pod creation.")
107107
flagSet.Var(HostSettingsCheck.Ptr(), "host-settings", "how to handle non-optimal host kernel settings: check (default, advisory-only), ignore (do not check), adjust (best-effort auto-adjustment), or enforce (auto-adjustment must succeed).")
108-
flagSet.Bool("skip-restore-spec-validation-unsafe", false, "Enables skipping validation of the restore-time container spec when restoring checkpoints.")
108+
flagSet.Bool("unsafe-skip-restore-spec-validation", false, "Enables skipping validation of the restore-time container spec when restoring checkpoints.")
109109

110110
// Flags that control sandbox runtime behavior: MM related.
111111
flagSet.Bool("app-huge-pages", true, "enable use of huge pages for application memory; requires /sys/kernel/mm/transparent_hugepage/shmem_enabled = advise")

0 commit comments

Comments
 (0)