Additionally, IMO we can rename this configuration file to have a generic
name (stratos.xml/stratos.properties). wdyt?

On Fri, Nov 13, 2015 at 12:53 PM, Gayan Gunarathne <gay...@wso2.com> wrote:

> Hi,
>
> On Fri, Nov 13, 2015 at 12:42 PM, Rajkumar Rajaratnam <rajkum...@wso2.com>
> wrote:
>
>> Hi Devs,
>>
>> This file content is as below.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *autoscaler.service.url=https://localhost:9443/services/AutoscalerService/
>> <https://localhost:9443/services/AutoscalerService/>cloud.controller.service.url=https://localhost:9443/services/CloudControllerService/
>> <https://localhost:9443/services/CloudControllerService/>stratos.manager.service.url=https://localhost:9443/services/StratosManagerService/
>> <https://localhost:9443/services/StratosManagerService/>das.metering.dashboard.url=https://localhost:9444/portal/dashboards/metering-dashboard
>> <https://localhost:9444/portal/dashboards/metering-dashboard>das.monitoring.dashboard.url=https://localhost:9444/portal/dashboards/monitoring-dashboard
>> <https://localhost:9444/portal/dashboards/monitoring-dashboard>puppet.ip=127.0.0.1puppet.hostname=puppet.stratos.apache.org
>> <http://puppet.stratos.apache.org>puppet.dns.available=falsepuppet.environment=stratos*
>>
>> CartridgeConfigFileReader class (part of SM component) reads this file
>> and set these properties as system variables and these system variables are
>> used by other components like AS (to communicate with CC).
>>
>> This approach have several issues.
>>
>> a) Since the component's start up order is CC > AS > SM, there is no
>> guarantee that these properties will be set before other components start.
>> b) In distributed deployment, these properties will not be set in AS JVM.
>> c) This file contains information which are used by other components, not
>> only cartridges. So this file name is misleading.
>>
>> IMO, we need to fix it for 4.1.5 release. Without fixing this, I can't
>> fix the issue discussed in [1]. I am getting error [2].
>>
>> There can be several way to fix this; some of them are.
>>
>> A) We can remove following properties from cartridge-config.properties
>> file and set them as system properties in stratos.sh scripts.
>>
>>
>>
>>
>>
>> *autoscaler.service.url=https://localhost:9443/services/AutoscalerService/
>> <https://localhost:9443/services/AutoscalerService/>cloud.controller.service.url=https://localhost:9443/services/CloudControllerService/
>> <https://localhost:9443/services/CloudControllerService/>stratos.manager.service.url=https://localhost:9443/services/StratosManagerService/
>> <https://localhost:9443/services/StratosManagerService/>das.metering.dashboard.url=https://localhost:9444/portal/dashboards/metering-dashboard
>> <https://localhost:9444/portal/dashboards/metering-dashboard>das.monitoring.dashboard.url=https://localhost:9444/portal/dashboards/monitoring-dashboard
>> <https://localhost:9444/portal/dashboards/monitoring-dashboard>*
>>
>> B) This file should be read by all other components (e.g SM, AS) which
>> need these properties.
>>
>> WDYT?
>>
>
> IMO we can read this file and maintain the information in the in memory
>  so every component can pick from there. We can have a common method to
> read this file as those properties are used among all the components.
> Also we can change the configuration name also as that configuration name
> seems to be confuse. May be we can have like stratos-config.properties
>
>
>> [1] [Stratos 4.1.5] [Blocker] Monitors are not created on Stratos restart
>> [2]
>>
>> [2015-11-13 11:37:36,468] ERROR
>> {org.apache.stratos.autoscaler.monitor.MonitorFactory} -  Error while
>> validating deployment policy from cloud controller [network-partition-id]
>> network-partition-1
>> java.lang.RuntimeException: System property not found:
>> cloud.controller.service.url
>>     at
>> org.apache.stratos.common.client.CloudControllerServiceClient.getInstance(CloudControllerServiceClient.java:75)
>>     at
>> org.apache.stratos.autoscaler.monitor.MonitorFactory.getClusterMonitor(MonitorFactory.java:270)
>>     at
>> org.apache.stratos.autoscaler.monitor.MonitorFactory.getMonitor(MonitorFactory.java:83)
>>     at
>> org.apache.stratos.autoscaler.monitor.component.ParentComponentMonitor$MonitorAdder.run(ParentComponentMonitor.java:1001)
>>     at
>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>>     at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>>     at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>     at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>     at java.lang.Thread.run(Thread.java:745)
>> [2015-11-13 11:37:36,469] ERROR
>> {org.apache.stratos.autoscaler.monitor.component.ParentComponentMonitor} -
>> An error occurred while starting monitor: [type] cluster [component]
>> single-cartridge-app.my-php.php.domain
>> java.lang.RuntimeException: Error while validating deployment policy from
>> cloud controller [network-partition-id] network-partition-1
>>     at
>> org.apache.stratos.autoscaler.monitor.MonitorFactory.getClusterMonitor(MonitorFactory.java:278)
>>     at
>> org.apache.stratos.autoscaler.monitor.MonitorFactory.getMonitor(MonitorFactory.java:83)
>>     at
>> org.apache.stratos.autoscaler.monitor.component.ParentComponentMonitor$MonitorAdder.run(ParentComponentMonitor.java:1001)
>>     at
>> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>>     at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>>     at
>> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>     at
>> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>     at java.lang.Thread.run(Thread.java:745)
>> Caused by: java.lang.RuntimeException: System property not found:
>> cloud.controller.service.url
>>     at
>> org.apache.stratos.common.client.CloudControllerServiceClient.getInstance(CloudControllerServiceClient.java:75)
>>     at
>> org.apache.stratos.autoscaler.monitor.MonitorFactory.getClusterMonitor(MonitorFactory.java:270)
>>     ... 7 more
>>
>
>
>>
>> Thanks,
>> Raj.
>>
>> --
>> Rajkumar Rajaratnam
>> Committer & PMC Member, Apache Stratos
>> Software Engineer, WSO2
>>
>> Mobile : +94777568639
>> Blog : rajkumarr.com
>>
>
>
>
> --
>
> Gayan Gunarathne
> Technical Lead, WSO2 Inc. (http://wso2.com)
> Committer & PMC Member, Apache Stratos
> email : gay...@wso2.com  | mobile : +94 775030545
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048* <http://wso2.com/>*
>
>
> * <http://wso2.com/>*
>
>
>

Reply via email to