-
Notifications
You must be signed in to change notification settings - Fork 59
panic: Error migrating database: Error 1050: Table 'cloud_operations' already exists #194
Comments
Hi @arpitvipulsharma! I have seen this issue happen when the manifest.yml has json that isn't formatted correctly in it. Are you using the manifest that is in this repo? If so, what additional properties did you add to the manifest? |
Hi @mkjelland ! Yes I am using manifest file which is in this repo. I have defined db host and user as follows:
|
Hi @mkjelland ! Any suggestion regarding this?
|
Have found a dirty workaround to circumvent this issue. I observed that under migrations.go, the actual create table sql command for cloud_operations exists. So, I replaced the CREATE TABLE with CREATE TABLE IF NOT EXISTS for cloud_operations table in the migrations.go file and pushed the changes to cf. After this, gcp-service-broker app got deployed successfully. However, I am still unsure why does the migrations code is reporting an error even if the create table command is successful. I verified this by manually dropping all the tables from the servicebroker database and observed that the original code did create the table. Will further investigate this issue and share any findings. |
Hey @arpitvipulsharma! Those fields look good, but how are you setting the ROOT_SERVICE_ACCOUNT_JSON field? |
|
Can you try putting the ROOT_SERVICE_ACCOUNT_JSON object all on one line? |
Hi @mkjelland
Thank you |
Hello Team,
I am pushing gcp-service-broker app to Open Source CF. I am getting following error:
017-12-28T19:53:40.68+0100 [APP/PROC/WEB/0] ERR panic: Error migrating database: Error 1050: Table 'cloud_operations' already exists
2017-12-28T19:53:40.68+0100 [APP/PROC/WEB/0] ERR goroutine 1 [running]:
2017-12-28T19:53:40.68+0100 [APP/PROC/WEB/0] ERR gcp-service-broker/db_service.New.func1()
2017-12-28T19:53:40.68+0100 [APP/PROC/WEB/0] ERR /tmp/gobuildpack.gopath385159442/.go/src/gcp-service-broker/db_service/db_service.go:37 +0x155
2017-12-28T19:53:40.68+0100 [APP/PROC/WEB/0] ERR sync.(*Once).Do(0x5632a6738898, 0xc420195ec8)
2017-12-28T19:53:40.68+0100 [APP/PROC/WEB/0] ERR /tmp/contents525594273/deps/0/go1.8.5/go/src/sync/once.go:44 +0xc0
2017-12-28T19:53:40.68+0100 [APP/PROC/WEB/0] ERR gcp-service-broker/db_service.New(0x5632a66f2400, 0xc4201639e0, 0xc4202167c0)
2017-12-28T19:53:40.68+0100 [APP/PROC/WEB/0] ERR /tmp/gobuildpack.gopath385159442/.go/src/gcp-service-broker/db_service/db_service.go:39 +0x6b
2017-12-28T19:53:40.68+0100 [APP/PROC/WEB/0] ERR main.main()
2017-12-28T19:53:40.68+0100 [APP/PROC/WEB/0] ERR /tmp/gobuildpack.gopath385159442/.go/src/gcp-service-broker/server.go:40 +0x211
Can anyone help me on this?
The text was updated successfully, but these errors were encountered: