stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Punnadi Gunarathna <punn...@wso2.com>
Subject Re: How to set values for ARTFCT_CLONE_RETRIES & ARTFCT_CLONE_INT in agent.conf
Date Fri, 14 Aug 2015 07:36:48 GMT
Hi Udara,

I checked for the run file in /usr/local/bin in my spawned docker container
and it is not there. But in the base image the code is exactly same with
what you have provided above.



On Fri, Aug 14, 2015 at 12:39 PM, Udara Liyanage <udara@wso2.com> wrote:

> Hi,
>
> Found that run script which is the entry point of the of the base image
> have following lines to replace it. Could you check weather your Docker
> image have them.
> [Adding Lasindu]
>
> if [ -z "${ARTFCT_CLONE_RETRIES}" ]; then
>
>
>         sed -i "s/ARTFCT_CLONE_RETRIES/5/g" ${PCA_HOME}/agent.conf
> else
>         sed -i "s/ARTFCT_CLONE_RETRIES/${ARTFCT_CLONE_RETRIES}/g"
> ${PCA_HOME}/agent.conf
> fi
>
>
>
> On Fri, Aug 14, 2015 at 12:19 PM, Punnadi Gunarathna <punnadi@wso2.com>
> wrote:
>
>> Hi All,
>>
>> I encountered below exception in CA log.
>>
>> [2015-08-14 06:21:58,671] DEBUG {agentgithandler.py:checkout} - Cloning
>> artifacts from
>> https://admin:admin@s2git.appfactory.private.wso2.com:8444/r/Development/as/3.git
>> for the first time to /opt/wso2as-5.2.1/repository/tenants/3
>> [2015-08-14 06:21:58,671] DEBUG {agentgithandler.py:checkout} - Executing
>> git clone: [tenant-id] 3 [repo-url]
>> https://admin:admin@s2git.appfactory.private.wso2.com:8444/r/Development/as/3.git,
>> [repo path] /opt/wso2as-5.2.1/repository/tenants/3
>> [2015-08-14 06:22:03,780] WARNING {agentgithandler.py:checkout} -
>> Warning: Git clone operation failed. Retrying...
>> [2015-08-14 06:22:03,781] DEBUG {config.py:read_property} - Reading
>> property: artifact.clone.retries = ARTFCT_CLONE_RETRIES
>> [2015-08-14 06:22:03,781] ERROR {subscriber.py:run} - Error processing
>> 'ArtifactUpdatedEvent' event
>> Traceback (most recent call last):
>>   File "/opt/apache-stratos-python-cartridge-agent-4.1.1/subscriber.py",
>> line 105, in run
>>     handler(event_msg)
>>   File "agent.py", line 197, in on_artifact_updated
>>     self.__event_handler.on_artifact_updated_event(event_obj)
>>   File
>> "/opt/apache-stratos-python-cartridge-agent-4.1.1/modules/event/eventhandler.py",
>> line 93, in on_artifact_updated_event
>>     subscribe_run, updated = AgentGitHandler.checkout(repo_info)
>>   File
>> "/opt/apache-stratos-python-cartridge-agent-4.1.1/modules/artifactmgt/git/agentgithandler.py",
>> line 99, in checkout
>>     AgentGitHandler.retry_clone(git_repo)
>>   File
>> "/opt/apache-stratos-python-cartridge-agent-4.1.1/modules/artifactmgt/git/agentgithandler.py",
>> line 219, in retry_clone
>>     max_retry_attempts =
>> int(Config.read_property(constants.ARTIFACT_CLONE_RETRIES, 5))
>> ValueError: invalid literal for int() with base 10: 'ARTFCT_CLONE_RETRIES'
>>
>>
>> When I open the agant.conf file, those hard coded values were there
>> instead of their actual values.
>>
>> artifact.clone.retries                =ARTFCT_CLONE_RETRIES
>> artifact.clone.interval               =ARTFCT_CLONE_INT
>>
>> How to pass these values?
>> --
>> Thanks and Regards,
>>
>> Punnadi Gunarathna
>> Senior Software Engineer,
>> WSO2, Inc.; http://wso2.com <http://wso2>
>> Blog: http://hi-my-world.blogspot.com/
>> Tel : 94 11 214 5345
>> Fax :94 11 2145300
>>
>>
>>
>> <http://lalajisureshika.blogspot.com/>
>>
>
>
>
> --
>
> Udara Liyanage
> Software Engineer
> WSO2, Inc.: http://wso2.com
> lean. enterprise. middleware
>
> web: http://udaraliyanage.wordpress.com
> phone: +94 71 443 6897
>



-- 
Thanks and Regards,

Punnadi Gunarathna
Senior Software Engineer,
WSO2, Inc.; http://wso2.com <http://wso2>
Blog: http://hi-my-world.blogspot.com/
Tel : 94 11 214 5345
Fax :94 11 2145300



<http://lalajisureshika.blogspot.com/>

Mime
View raw message