os.rename does not work with windows

Bug #1240927 reported by Curtis Hovey
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Nate Finch
1.16
Fix Released
Critical
Nate Finch
juju-core (Ubuntu)
Fix Released
Undecided
Unassigned
Saucy
Fix Released
High
Unassigned
Trusty
Fix Released
Undecided
Unassigned

Bug Description

[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 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.

Related branches

Curtis Hovey (sinzui)
Changed in juju-core:
milestone: none → 1.16.1
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 1.16.1 → 1.17.0
status: Fix Released → In Progress
importance: Critical → High
Curtis Hovey (sinzui)
summary: - os.rename does not wotk with windows
+ os.rename does not work with windows
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package juju-core - 1.16.2-0ubuntu1

---------------
juju-core (1.16.2-0ubuntu1) trusty; urgency=low

  * New upstream point release.
    (LP: #1240709, #1240927, #1246320, #1246556, #1245004)
    (LP: #1081247, #1229275, #1239508, #1240423, #1241666, #1243861).
 -- James Page <email address hidden> Thu, 31 Oct 2013 21:22:45 +0000

Changed in juju-core (Ubuntu Trusty):
status: New → Fix Released
Curtis Hovey (sinzui)
Changed in juju-core:
status: In Progress → Fix Committed
James Page (james-page)
description: updated
description: updated
James Page (james-page)
Changed in juju-core (Ubuntu Saucy):
importance: Undecided → High
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Curtis, or anyone else affected,

Accepted juju-core into saucy-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/juju-core/1.16.3-0ubuntu0.13.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in juju-core (Ubuntu Saucy):
status: New → Fix Committed
tags: added: verification-needed
James Page (james-page)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package juju-core - 1.16.3-0ubuntu0.13.10.1

---------------
juju-core (1.16.3-0ubuntu0.13.10.1) saucy-proposed; urgency=low

  * New upstream stable point release:
    - MAAS: juju destroy-environment also destroys nodes that are not
      controlled by juju/in different juju environments
      (LP: #1229275, #1081247).
    - MAAS: LXC container provisioning broken due to missing secrets
      in API calls (LP: #1246556).
    - MAAS: disambiguate use of environment uuid between state server
      and environment configuration (LP: #1240423).
    - local: provider fails to start due to missing setup of bootstrap
      storage (LP: #1240709).
    - local: local provider deploys fail due to inclusion of lxc package
      within LXC containers (LP: #1247299).
    - Azure: bootstrap fails due to old API version headers (LP: #1246320).
    - client: os.rename does not work on Windows (LP: #1240927).
    - simplestreams: cannot create simplestreams data for Ubuntu Trusty
      (LP: #1241666).
    - cloud-init: Embed full cloud-archive keyring in metadata to avoid
      calls to keyserver.ubuntu.com which fail in egress restricted
      data center environments (LP: #1243861).
    - core: regression - relation name regex is to restrictive (LP: #1245004).
 -- James Page <email address hidden> Thu, 21 Nov 2013 10:30:39 +0000

Changed in juju-core (Ubuntu Saucy):
status: Fix Committed → Fix Released
Revision history for this message
Stéphane Graber (stgraber) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.