** Description changed: - Turns out that os.rename works as atomic file replacement on linux, but - not on Windows. There's actually no way (as far as I can tell) to - atomically replace a file with another one on windows using the go code - as written. Luckily, it's not hard to wrap the Windows API in go code - and use that.... so that's what this code code. + [Impact] + juju is broken as a client on Windows + + [Test Case] + Use juju on windows; renaming of files breaks and client exits + + [Regression Potential] + Although this is a bug that only impacts Windows client users, the fix potentially impacts the way all renames are done in the client and server, so care should be taking to ensure that non-Windows environments still function (they do). + + [Original Bug Report] + Turns out that os.rename works as atomic file replacement on linux, but not on Windows. There's actually no way (as far as I can tell) to atomically replace a file with another one on windows using the go code as written. Luckily, it's not hard to wrap the Windows API in go code and use that.... so that's what this code code.
** Description changed: [Impact] juju is broken as a client on Windows [Test Case] Use juju on windows; renaming of files breaks and client exits [Regression Potential] - Although this is a bug that only impacts Windows client users, the fix potentially impacts the way all renames are done in the client and server, so care should be taking to ensure that non-Windows environments still function (they do). + Although this is a bug that only impacts Windows client users, the fix impacts the way all renames are done in the client and server, so care should be taking to ensure that non-Windows environments still function (they do). [Original Bug Report] Turns out that os.rename works as atomic file replacement on linux, but not on Windows. There's actually no way (as far as I can tell) to atomically replace a file with another one on windows using the go code as written. Luckily, it's not hard to wrap the Windows API in go code and use that.... so that's what this code code. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1240927 Title: os.rename does not work with windows To manage notifications about this bug go to: https://bugs.launchpad.net/juju-core/+bug/1240927/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
