-
Notifications
You must be signed in to change notification settings - Fork 881
Conversation
} | ||
hostnamePath := filepath.Join(common.Stage1RootfsPath(p.Root), "etc/hostname") | ||
if err := ioutil.WriteFile(hostnamePath, []byte(p.Hostname), 0644); err != nil { | ||
log.FatalE("error writing "+hostnamePath, err) |
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.
Here and below, please don't FatalE. Log the error and return 254 instead, so defers can run.
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.
Good catch, though I was just matching style. This whole file needs to be fixed; I can take care of that in another PR.
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.
Yes, I'm also guilty of introducing some of those FatalE, but I think we can gradually phase them out.
468e167
to
3a26e43
Compare
@lucab thanks, updated! Also, added a test file I forgot to commit earlier. |
This fixes a regression where the pod's hostname was missing from /etc/hosts Fixes rkt#3422
3a26e43
to
e0b450e
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.
LGTM
This fixes a regression where the pod's hostname was missing from /etc/hosts
Fixes #3422