Skip to content
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

Minikube memory assets have a strange modification date #9252

Closed
afbjorklund opened this issue Sep 15, 2020 · 1 comment · Fixed by #9256
Closed

Minikube memory assets have a strange modification date #9252

afbjorklund opened this issue Sep 15, 2020 · 1 comment · Fixed by #9256
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@afbjorklund
Copy link
Collaborator

The MemoryAsset in minikube doesn't have a date set (uses time.Time{}).

This causes errors on certain platforms, for instance on the Raspberry Pi:

pi@raspberrypi:~ $ touch -d '0001-01-01 00:00:00 +0000' /tmp/test
touch: invalid date format '0001-01-01 00:00:00 +0000'

It "works" on the regular platform, but still looks a bit odd and is probably wrong.

@afbjorklund afbjorklund added kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence. labels Sep 15, 2020
@afbjorklund
Copy link
Collaborator Author

The suggestion is to just skip the "touch" part, when the mtime is not set.

       scp := fmt.Sprintf("sudo test -d %s && sudo scp -t %s", f.GetTargetDir(), f.GetTargetDir())
        mtime, err := f.GetModTime()
        if err != nil {
                glog.Infof("error getting modtime for %s: %v", dst, err)
        } else {
                scp += fmt.Sprintf(" && sudo touch -d \"%s\" %s", mtime.Format(layout), dst)
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant