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

Daylight savings time change broke node controller #5183

Closed
smarterclayton opened this issue Mar 9, 2015 · 8 comments · Fixed by #5185
Closed

Daylight savings time change broke node controller #5183

smarterclayton opened this issue Mar 9, 2015 · 8 comments · Fixed by #5185
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.

Comments

@smarterclayton
Copy link
Contributor

After the DST change:

E0309 15:39:48.081198   25506 nodecontroller.go:213] error updating node openshiftdev.local: minion "openshiftdev.local" is invalid: metadata.creationTimestamp: invalid value '2015-03-08 18:27:34 -0400 -0400': field is immutable
E0309 15:39:58.170146   25506 nodecontroller.go:244] Can't get ip address of node claytons-macbook-pro.local: lookup claytons-macbook-pro.local: no such host
E0309 15:39:58.173485   25506 nodecontroller.go:213] error updating node claytons-macbook-pro.local: minion "claytons-macbook-pro.local" is invalid: metadata.creationTimestamp: invalid value '2015-03-08 20:25:50 -0400 -0400': field is immutable

We should be ignoring creationTimestamp on update.

@smarterclayton smarterclayton added kind/bug Categorizes issue or PR as related to a bug. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. labels Mar 9, 2015
@alex-mohr alex-mohr added sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. team/master and removed sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. labels Mar 9, 2015
@bgrant0607
Copy link
Member

@smarterclayton Could you please explain the cause of the failure in more detail? Do we not normalize the timezone in the representation used in the API?

@smarterclayton
Copy link
Contributor Author

When we serialize to JSON we are using a value that has a timezone embedded in it (time.Time). As a result the representation changed. We should normalize it as well during serialization, but in general creationTimestamp should not prevent an update since it can safely be ignored.

@bgrant0607
Copy link
Member

I think we should allow creationTimestamp to be empty and also convert time to UTC() before marshaling.

@bgrant0607
Copy link
Member

More specifically:

We'd also want to change:
https://github.com/GoogleCloudPlatform/kubernetes/blob/master/pkg/util/time.go#L92
to

    return json.Marshal(t.UTC().Format(time.RFC3339))

and
https://github.com/GoogleCloudPlatform/kubernetes/blob/master/pkg/util/time.go#L81
to

    t.Time = pt.UTC()

@smarterclayton
Copy link
Contributor Author

Makes sense to me - clients should always control their timezone and with distributed masters you might see different values.

----- Original Message -----

I think we should allow creationTimestamp to be empty and also convert time
to UTC() before marshaling.


Reply to this email directly or view it on GitHub:
#5183 (comment)

@smarterclayton
Copy link
Contributor Author

I'll own the follow up on this.

----- Original Message -----

More specifically:

We'd also want to change:
https://github.com/GoogleCloudPlatform/kubernetes/blob/master/pkg/util/time.go#L92
to

  return json.Marshal(t.UTC().Format(time.RFC3339))

and
https://github.com/GoogleCloudPlatform/kubernetes/blob/master/pkg/util/time.go#L81
to

  t.Time = pt.UTC()

Reply to this email directly or view it on GitHub:
#5183 (comment)

@liggitt
Copy link
Member

liggitt commented Mar 10, 2015

+1 for UTC serialization

@smarterclayton
Copy link
Contributor Author

Opened #5416 to marshal to utc when serializing

On Mar 10, 2015, at 6:08 AM, Jordan Liggitt notifications@github.com wrote:

+1 for UTC serialization


Reply to this email directly or view it on GitHub.

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/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants