You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/09/09 12:31:01 UTC
[GitHub] [skywalking] buddy-yao opened a new issue #7686: [Feature] SkyWalking should check if the database exists first, instead of creating it directly.
buddy-yao opened a new issue #7686:
URL: https://github.com/apache/skywalking/issues/7686
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
I am using InfluxDB as the storage, the InFluxDB is provided by cloud provider, it does't has admin privilege.
If SkyWalking try to create database, it will fail.
I think, SkyWalking should check if the database exists first, instead of creating it directly.
```
2021-09-09 19:40:48,227 - org.apache.skywalking.oap.server.starter.OAPServerBootstrap -4223 [main] ERROR [] - error authorizing query: skywalking not authorized to execute statement 'CREATE DATABASE skywa
lking', requires admin privilege
org.influxdb.InfluxDBException: error authorizing query: skywalking not authorized to execute statement 'CREATE DATABASE skywalking', requires admin privilege
at org.influxdb.InfluxDBException.buildExceptionFromErrorMessage(InfluxDBException.java:161) ~[influxdb-java-2.15.jar:?]
at org.influxdb.InfluxDBException.buildExceptionForErrorState(InfluxDBException.java:188) ~[influxdb-java-2.15.jar:?]
at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:806) ~[influxdb-java-2.15.jar:?]
at org.influxdb.impl.InfluxDBImpl.executeQuery(InfluxDBImpl.java:795) ~[influxdb-java-2.15.jar:?]
at org.influxdb.impl.InfluxDBImpl.query(InfluxDBImpl.java:552) ~[influxdb-java-2.15.jar:?]
at org.apache.skywalking.oap.server.storage.plugin.influxdb.InfluxClient.connect(InfluxClient.java:77) ~[storage-influxdb-plugin-8.7.0.jar:8.7.0]
at org.apache.skywalking.oap.server.storage.plugin.influxdb.InfluxStorageProvider.start(InfluxStorageProvider.java:140) ~[storage-influxdb-plugin-8.7.0.jar:8.7.0]
at org.apache.skywalking.oap.server.library.module.BootstrapFlow.start(BootstrapFlow.java:49) ~[library-module-8.7.0.jar:8.7.0]
at org.apache.skywalking.oap.server.library.module.ModuleManager.init(ModuleManager.java:60) ~[library-module-8.7.0.jar:8.7.0]
at org.apache.skywalking.oap.server.starter.OAPServerBootstrap.start(OAPServerBootstrap.java:43) [server-bootstrap-8.7.0.jar:8.7.0]
at org.apache.skywalking.oap.server.starter.OAPServerStartUp.main(OAPServerStartUp.java:27) [server-starter-es7-8.7.0.jar:8.7.0]
```
### Use case
When SkyWalking using InfluxDB as the storage, SkyWalking should check if the database exists, if not, then try create database.
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] wu-sheng commented on issue #7686: [Feature] SkyWalking should check if the database exists first, instead of creating it directly.
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #7686:
URL: https://github.com/apache/skywalking/issues/7686#issuecomment-1022029948
No update in months.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] wu-sheng closed issue #7686: [Feature] SkyWalking should check if the database exists first, instead of creating it directly.
Posted by GitBox <gi...@apache.org>.
wu-sheng closed issue #7686:
URL: https://github.com/apache/skywalking/issues/7686
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] gaggudeep commented on issue #7686: [Feature] SkyWalking should check if the database exists first, instead of creating it directly.
Posted by GitBox <gi...@apache.org>.
gaggudeep commented on issue #7686:
URL: https://github.com/apache/skywalking/issues/7686#issuecomment-916406895
Hi @wu-sheng, can I contribute here? This would be my first contribution. I think I got what is required; additional check in all DBClients (like this: https://github.com/apache/skywalking/blob/f61dff9a9f1d1f8ddd11c31f039e540521479d36/oap-server/server-storage-plugin/storage-influxdb-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/influxdb/InfluxClient.java) to check if the the DB property (in this case: InfluxDB influx) is already initialized or not.(if it is then log some info and return?)
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] wu-sheng commented on issue #7686: [Feature] SkyWalking should check if the database exists first, instead of creating it directly.
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #7686:
URL: https://github.com/apache/skywalking/issues/7686#issuecomment-916512009
Basically you can, just should notice, whether database creation could require more parameters, and only create if it missed.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] wu-sheng commented on issue #7686: [Feature] SkyWalking should check if the database exists first, instead of creating it directly.
Posted by GitBox <gi...@apache.org>.
wu-sheng commented on issue #7686:
URL: https://github.com/apache/skywalking/issues/7686#issuecomment-916069507
Do you want to contribute this? This is not a critical issue. We don't check this in all database implementations, such as PostgreSQL, MySQL, TiDB.
Of course, it is fine to add if you want.
--
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.
To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org