-
Notifications
You must be signed in to change notification settings - Fork 246
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
stages/files: add previousReport to the result report if Ignition is run more than once #1254
Conversation
3eebf54
to
d71f4f8
Compare
61fdbab
to
4a8e210
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General approach LGTM. 👍
return fmt.Errorf("reading previous report: %w", err) | ||
} | ||
if err == nil { | ||
err = json.Unmarshal(prevData, &prevReport) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, let's log a warning in this case too, similar to the one in coreos/fedora-coreos-config#1148.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we do this only if we're not on a live system? Otherwise, this will be forever stacking previousReport
s on each live boot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we do this only if we're not on a live system? Otherwise, this will be forever stacking
previousReport
s on each live boot.
Yeah, that's a good point!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each of the stacked Ignition runs affect the live system, so my thinking was that recording the run history was useful. But I'm okay dropping it if we want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm OK adding onto it I guess, though continually nesting when you know it could keep going forever by design feels weird. Would be more natural if it were a list instead, i.e. previousReports[]
.
4a8e210
to
502c201
Compare
2ea3db2
to
23e44da
Compare
23e44da
to
37d88d6
Compare
This change notices if a report already exists and accordingly nest the report in previousReport. related to coreos#1214
37d88d6
to
cbe5c3c
Compare
This change notices if a report already exists and accordingly nest the report in
previousReport
.related to #1214
Based on this change, the
fedora-coreos-config
code would check ifpreviousReport
exists and could throw a fat warning sayingIgnition was previously run at xx. Unexpected behavior may occur. Ignition is not designed to run more than once per system.