Great work Pubudu and Akila!

On Thu, Aug 27, 2015 at 2:10 PM, Akila Ravihansa Perera <raviha...@wso2.com>
wrote:

> Hi Pubudu,
>
> Thanks for the update and sending the PR. I've already fixed this on
> stratos-4.1.x branch. It took me a while to push it because I was working
> on writing an integration test to cover this scenario.
>
> While writing the integration test I noticed that PCA is throwing many
> exceptions. Some were due to missing extensions and some were caused by
> bugs. For eg: PCA did not update the member status property in the
> TopologyContext upon receiving the member initialized event causing "Member
> has not initialized error". But it worked because currently PCA will skip
> that validation if ArtifactUpdatedEvent is received. Something we will have
> to look into later.
>
> After fixing those exceptions I observed that PCA does not run the
> scheduled tasks to commit/pull the repo. After struggling few hours I
> noticed this was due to a blocking call in the constructor of
> ThriftPublisher class. I've moved that to a separate thread and the problem
> got resolved.
>
> PCA integration tests can be found in
> products/python-cartridge-agent/integration. I have created separate test
> suites that will deploy separate sets of agent configuration files and run
> those tests with different configurations. It will ensure PCA basic startup
> activation functionality, Git repo clone and Git push. Currently those
> tests are limited to live profile due to a limitation in Jenkins builder.
>
> Thanks.
>
>
>
> On Fri, Aug 28, 2015 at 1:32 AM, Pubudu Gunatilaka <pubu...@wso2.com>
> wrote:
>
>> Hi Devs,
>>
>> Above mentioned error can be seen at the agent log when PCA tries to
>> commit files to the git. In the current implementation we keep track of the
>> modified files as well as untracked files. But we don't use those files.
>> Error occurred when trying to get the file list using the split command.
>> Due to line ending conventions of different operating systems this fails.
>> As we are not using unstaged files, I changed the code to stage all files
>> and commit them.
>>
>> After this change commits were successful but I couldn't push files to
>> the repo. When I run the git command for push in standalone got the
>> following error message after sometime.
>>
>> *error: Couldn't resolve host 'github.com <http://github.com>' while
>> accessing https://<User_ID>:<Password>@github.com/
>> <http://github.com/><User_ID>/ActiveMq-Sample.git/info/refs*
>> *fatal: HTTP request failed *
>>
>> I found a solution in [1] which is to reload the vagrant setup which I
>> used for Kubernetes cluster setup. Problem was with the vagrant setup which
>> was running for few days. With the refresh pack, files can be pushed to the
>> git hub. So there wasn't any problem with the source code for pushing files
>> to the git. Everything works fine with the fix for the commit issue.
>>
>> Please find the PR in [2] for this issue.
>>
>> [1] -
>> http://stackoverflow.com/questions/11890740/git-error-couldnt-connect-to-host-while-accessing
>> [2] - https://github.com/apache/stratos/pull/452
>>
>> Thank you!
>>
>>
>>
>>
>> On Tue, Aug 25, 2015 at 10:42 PM, Imesh Gunaratne <im...@apache.org>
>> wrote:
>>
>>> We need more information on this, the complete agent log, the folder
>>> path given, was the above folder empty at the beginning, why its detecting
>>> un-staged files, etc.
>>>
>>> IMO we might not need to check un-staged files rather we could stage
>>> everything, commit and push.
>>>
>>> On Tue, Aug 25, 2015 at 9:57 PM, Gayan Gunarathne <gay...@wso2.com>
>>> wrote:
>>>
>>>> Seems like issue is occur when we retrieving the untrcked_files based
>>>> on the git unstaged files.Shall we check the "git status" output when this
>>>> error occurred?
>>>>
>>>> Based on the git status output we can check the following line
>>>> untracked_files = output.split("Untracked files:")[1].split("\n\n")[1].
>>>> split("\n")
>>>>
>>>> Thanks.
>>>> Gayan
>>>>
>>>> On Tue, Aug 25, 2015 at 9:43 PM, Akila Ravihansa Perera <
>>>> raviha...@wso2.com> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Looks like this is a blocker for 4.1.2 release, if the issue is
>>>>> actually in the PCA.
>>>>> @Chamila: Would you be able to help with troubleshooting?
>>>>>
>>>>> Thanks.
>>>>>
>>>>> On Tue, Aug 25, 2015 at 8:24 PM, Chamila De Alwis <chami...@wso2.com>
>>>>> wrote:
>>>>>
>>>>>> Hi Pubudu,
>>>>>>
>>>>>> It looks like "git status" command returns an unusual output for the
>>>>>> particular repository. Could you check if the same command is running
>>>>>> without an issue standalone?
>>>>>>
>>>>>> (On a mobile)
>>>>>> Regards,
>>>>>> Chamila de Alwis
>>>>>> Committer and PMC Member - Apache Stratos
>>>>>> Software Engineer - WSO2
>>>>>> http://code.chamiladealwis.com
>>>>>> On Aug 25, 2015 9:11 AM, "Pubudu Gunatilaka" <pubu...@wso2.com>
>>>>>> wrote:
>>>>>>
>>>>>>> Hi Devs,
>>>>>>>
>>>>>>> I am getting following error when agent tries to commit files to the
>>>>>>> given git repo.
>>>>>>>
>>>>>>> [2015-08-25 12:48:23,240] DEBUG {agentgithandler.py:execute_task} -
>>>>>>> Running commit job
>>>>>>> Exception in thread Thread-46:
>>>>>>> Traceback (most recent call last):
>>>>>>>   File "/usr/lib/python2.7/threading.py", line 552, in
>>>>>>> __bootstrap_inner
>>>>>>>     self.run()
>>>>>>>   File "/usr/lib/python2.7/threading.py", line 505, in run
>>>>>>>     self.__target(*self.__args, **self.__kwargs)
>>>>>>>   File
>>>>>>> "/opt/apache-stratos-python-cartridge-agent-4.1.2-SNAPSHOT/modules/artifactmgt/git/agentgithandler.py",
>>>>>>> line 507, in execute_task
>>>>>>>     AgentGitHandler.push(self.repo_info)
>>>>>>>   File
>>>>>>> "/opt/apache-stratos-python-cartridge-agent-4.1.2-SNAPSHOT/modules/artifactmgt/git/agentgithandler.py",
>>>>>>> line 331, in push
>>>>>>>     modified, unstaged_files =
>>>>>>> AgentGitHandler.get_unstaged_files(git_repo.local_repo_path)
>>>>>>>   File
>>>>>>> "/opt/apache-stratos-python-cartridge-agent-4.1.2-SNAPSHOT/modules/artifactmgt/git/agentgithandler.py",
>>>>>>> line 405, in get_unstaged_files
>>>>>>>     untracked_files = output.split("Untracked
>>>>>>> files:")[1].split("\n\n")[1].split("\n")
>>>>>>> IndexError: list index out of range
>>>>>>>
>>>>>>> Currently investigating the issue.
>>>>>>>
>>>>>>> Thank you!
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> *Pubudu Gunatilaka*
>>>>>>> Software Engineer
>>>>>>> WSO2, Inc.: http://wso2.com
>>>>>>> lean.enterprise.middleware
>>>>>>> mobile:  +94 77 4078049
>>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Akila Ravihansa Perera
>>>>> WSO2 Inc.;  http://wso2.com/
>>>>>
>>>>> Blog: http://ravihansa3000.blogspot.com
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Gayan Gunarathne
>>>> Technical Lead, WSO2 Inc. (http://wso2.com)
>>>> Committer & PMC Member, Apache Stratos
>>>> email : gay...@wso2.com  | mobile : +94 775030545 <%2B94%20766819985>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Imesh Gunaratne
>>>
>>> Senior Technical Lead, WSO2
>>> Committer & PMC Member, Apache Stratos
>>>
>>
>>
>>
>> --
>>
>> *Pubudu Gunatilaka*
>> Software Engineer
>> WSO2, Inc.: http://wso2.com
>> lean.enterprise.middleware
>> mobile:  +94 77 4078049
>>
>
>
>
> --
> Akila Ravihansa Perera
> WSO2 Inc.;  http://wso2.com/
>
> Blog: http://ravihansa3000.blogspot.com
>
> --
> Thanks and Regards,
>
> Isuru H.
> +94 716 358 048* <http://wso2.com/>*
>
>
> * <http://wso2.com/>*
>
>
>

Reply via email to