Pearl1594 opened a new pull request #80: URL: https://github.com/apache/cloudstack-cloudmonkey/pull/80
Fixes: https://github.com/apache/cloudstack-cloudmonkey/issues/68 Prior Fix: ``` $ cmk Failed to grab config file lock, please try again panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x6952e8] goroutine 1 [running]: github.com/apache/cloudstack-cloudmonkey/config.checkAndCreateDir(0xc00001a620, 0x19, 0x2, 0xc00001a620) /home/rohit/lab/apache/cloudmonkey/config/config.go:89 +0x158 github.com/apache/cloudstack-cloudmonkey/config.Config.CacheFile(0xc0000166f0, 0x10, 0xc00001a560, 0x17, 0xc00001a580, 0x18, 0xc00001a5a0, 0x14, 0x0, 0x0, ...) /home/rohit/lab/apache/cloudmonkey/config/config.go:84 +0xd7 github.com/apache/cloudstack-cloudmonkey/config.LoadCache(0xc0000285a0, 0xc0000285a0, 0x0) /home/rohit/lab/apache/cloudmonkey/config/cache.go:83 +0x95 github.com/apache/cloudstack-cloudmonkey/config.NewConfig(0xc0000281e0) /home/rohit/lab/apache/cloudmonkey/config/config.go:333 +0x54 main.main() /home/rohit/lab/apache/cloudmonkey/cmk.go:51 +0x1bd ``` Post Fix: #### Tested by changing the permission of cmk directory and then trying to login to cmk shell prompt ``` $ go run cmk.go User isn't authorized to access the config file exit status 1 [13:21:49] pearl@pearl-XPS-15-7590:~/go/src/github.com/pearl1594/cloudstack-cloudmonkey$ ``` #### Tested by changing the permission of cmk directory when user already has a cmk session running ``` $ go run cmk.go Apache CloudStack 🐵 CloudMonkey 6.1.0 Report issues: https://github.com/apache/cloudstack-cloudmonkey/issues (localcloud) 🐱 > set debug true [debug] UpdateConfig key:debug value:true update:true User isn't authorized to access the config file exit status 1 ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
