Commit Graph

11 Commits

Author SHA1 Message Date
James Bardin
4866f35645 add mutexes to Local, Backup, and InmemState 2017-05-25 11:20:52 -04:00
James Bardin
c0dda6a7b3 test failure for windows local locks 2017-02-17 13:29:47 -05:00
James Bardin
08cff7cc13 have LocalState check Lock ID on Unlock
Have LocalState store and check the lock ID, and strictly enforce
unlocking with the correct ID.

This isn't required for local lock correctness, as we track the file
descriptor to unlock, but it does provide a varification that locking
and unlocking is done correctly throughout terraform.
2017-02-15 14:41:55 -05:00
James Bardin
f5ed8cd288 Use NewLockInfo to get a pre-populated value
Using NewLockInfo ensure we start with all required fields filled.
2017-02-15 14:41:55 -05:00
James Bardin
52b2343672 make state test pass with new state.Locker 2017-02-15 14:41:55 -05:00
James Bardin
14d965722e Use single state.LockInfo struct
Remove redundant structures
2017-02-08 11:34:31 -05:00
James Bardin
6162cde6ff Add basic local state locking
Add the LockUnlock methods to LocalState and BackupState.

The implementation for LocalState will be platform specific. We will use
OS-native locking on the state files, speficially locking whichever
state file we intend to write to.
2017-01-30 17:16:57 -05:00
Mitchell Hashimoto
5c356f35b9 state: LocalState supports alternate output path 2015-02-23 15:13:54 -08:00
Mitchell Hashimoto
34864a64a5 state: LocalState allows file to not exist 2015-02-23 15:13:54 -08:00
Mitchell Hashimoto
6ec1b2b455 state: cache state test 2015-02-23 15:13:53 -08:00
Mitchell Hashimoto
1f7ddc30fe state: a bunch of state stuff 2015-02-23 15:13:53 -08:00