mirror of
https://github.com/containers/podman.git
synced 2025-05-20 16:47:39 +08:00
Fix setting timezone on HyperV
the timezone was being set with the wrong path separator for hyperv because it was being generated on Windows. Fixes: coreos/fedora-coreos-tracker#1580 Signed-off-by: Brent Baude <bbaude@redhat.com>
This commit is contained in:
@ -130,12 +130,11 @@ var _ = Describe("podman machine init", func() {
|
||||
Expect(foundMemory).To(BeNumerically(">", 3800000))
|
||||
Expect(foundMemory).To(BeNumerically("<", 4200000))
|
||||
|
||||
// TODO timezone setting is broken in FCOS rn. It is either ignition or a change in fedora.
|
||||
// sshTimezone := sshMachine{}
|
||||
// timezoneSession, err := mb.setName(name).setCmd(sshTimezone.withSSHCommand([]string{"date"})).run()
|
||||
// Expect(err).ToNot(HaveOccurred())
|
||||
// Expect(timezoneSession).To(Exit(0))
|
||||
// Expect(timezoneSession.outputToString()).To(ContainSubstring("HST"))
|
||||
sshTimezone := sshMachine{}
|
||||
timezoneSession, err := mb.setName(name).setCmd(sshTimezone.withSSHCommand([]string{"date"})).run()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(timezoneSession).To(Exit(0))
|
||||
Expect(timezoneSession.outputToString()).To(ContainSubstring("HST"))
|
||||
})
|
||||
|
||||
It("machine init with volume", func() {
|
||||
|
@ -127,8 +127,11 @@ func (ign *DynamicIgnition) GenerateIgnitionConfig() error {
|
||||
User: GetNodeUsr("root"),
|
||||
},
|
||||
LinkEmbedded1: LinkEmbedded1{
|
||||
Hard: BoolToPtr(false),
|
||||
Target: filepath.Join("/usr/share/zoneinfo", tz),
|
||||
Hard: BoolToPtr(false),
|
||||
// We always want this value in unix form (/path/to/something) because this is being
|
||||
// set in the machine OS (always Linux). However, filepath.join on windows will use a "\\"
|
||||
// separator; therefore we use ToSlash to convert the path to unix style
|
||||
Target: filepath.ToSlash(filepath.Join("/usr/share/zoneinfo", tz)),
|
||||
},
|
||||
}
|
||||
ignStorage.Links = append(ignStorage.Links, tzLink)
|
||||
|
Reference in New Issue
Block a user