You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2019/02/13 15:35:30 UTC
[GitHub] chetanmeh opened a new pull request #4280: MBean to dump config
information at a path
chetanmeh opened a new pull request #4280: MBean to dump config information at a path
URL: https://github.com/apache/incubator-openwhisk/pull/4280
This PR adds an MBean which enables dumping the typesafe config including details from where config is getting picked up. This is useful to troubleshoot config issues and confirm if the intended config is being picked up properly.
## Description
This PR registers an MBean which enables fetching typesafe config at specific path like `whisk.kafka`. It acceps a second boolean param which enables dumping of location information from where config value was picked up
```scala
trait ConfigMXBean {
def getConfig(path: String, originComment: Boolean): String
}
```
The MBean is registered with name `org.apache.openwhisk:name=config`
### Usage
```bash
$ docker exec -it xxx bash # Open bash shell to controller docker container
# cd $HOME
# wget https://search.maven.org/remotecontent?filepath=org/cyclopsgroup/jmxterm/1.0.0/jmxterm-1.0.0-uber.jar
# java -jar jmxterm-1.0.0-uber.jar
# open 1
# run -b org.apache.openwhisk:name=config getConfig whisk.spi true
#calling operation getConfig of mbean org.apache.openwhisk:name=config with params [whisk.spi, true]
#operation returns:
# reference.conf @ jar:file:/controller/lib/openwhisk-common-1.0.0-SNAPSHOT.jar!/reference.conf: 8
ActivationStoreProvider="org.apache.openwhisk.core.database.ArtifactActivationStoreProvider"
...
LoadBalancerProvider="org.apache.openwhisk.core.loadBalancer.ShardingContainerPoolBalancer"
# system properties
LogStoreProvider="org.apache.openwhisk.core.containerpool.logging.DockerToActivationLogStoreProvider"
# reference.conf @ jar:file:/controller/lib/openwhisk-common-1.0.0-SNAPSHOT.jar!/reference.conf: 9
MessagingProvider="org.apache.openwhisk.connector.kafka.KafkaMessagingProvider"
```
So one can see that LogStoreProvider is set via system property
## Related issue and scope
<!--- Please include a link to a related issue if there is one. -->
- [ ] I opened an issue to propose and discuss this change (#????)
## My changes affect the following components
<!--- Select below all system components are affected by your change. -->
<!--- Enter an `x` in all applicable boxes. -->
- [ ] API
- [ ] Controller
- [ ] Message Bus (e.g., Kafka)
- [ ] Loadbalancer
- [ ] Invoker
- [ ] Intrinsic actions (e.g., sequences, conductors)
- [ ] Data stores (e.g., CouchDB)
- [ ] Tests
- [ ] Deployment
- [ ] CLI
- [ ] General tooling
- [ ] Documentation
## Types of changes
<!--- What types of changes does your code introduce? Use `x` in all the boxes that apply: -->
- [ ] Bug fix (generally a non-breaking change which closes an issue).
- [ ] Enhancement or new feature (adds new functionality).
- [ ] Breaking change (a bug fix or enhancement which changes existing behavior).
## Checklist:
<!--- Please review the points below which help you make sure you've covered all aspects of the change you're making. -->
- [ ] I signed an [Apache CLA](https://github.com/apache/incubator-openwhisk/blob/master/CONTRIBUTING.md).
- [ ] I reviewed the [style guides](https://github.com/apache/incubator-openwhisk/wiki/Contributing:-Git-guidelines#code-readiness) and followed the recommendations (Travis CI will check :).
- [ ] I added tests to cover my changes.
- [ ] My changes require further changes to the documentation.
- [ ] I updated the documentation where necessary.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services