Raymond Dans wrote:
Subject: [sipX-dev] updating from sipXconfig

http://track.sipfoundry.org/browse/XCF-2954

Bogdan published his work-in-progress patch for switching sipXconfig updates to use XML/RPC. He has some questions: I thought that posting on the list might bring some useful comments:

Here it is:

<quoting from Bogdan's update>

- first of all, i had to modify the HttpServer.cpp in sipXtackLib project and to bypass some filename uri enforcing. As i saw in code, for security reasons, the request to retrieve published files that have filenames containing ".." will fail. But the problem is that the files published by sipXsupervisor (containing the stdout and stderr of the updates-relative command invoked) are published with path relative to the BUILD directory, containing ".." .

In order to test the functionality of the patch I bypassed the enforcing in HttpServer.cpp, but i think that the files should be published with their absolute path rather than relative path.

For example instead of:
"/home/user/work/BUILD/../INSTALL/somedir/../anotherdir/file.err"

it should be published as
"/home/user/work/INSTALL/anotherdir/file.err"

- the patch worked for version and for check-update just fine. However, for update command it just keeps running and it doesn't seem to stop. I checked the system processes and saw that one "sipx-swadmin.py" and one "yum update -y" processes were still running even after few hours. Trying to update manually, using the same "yum update -y" command, it finished in just few minutes successfully updating sipx. I couldn't figure why the update from application remain in running state and doesn't stop.

</quoting from Bogdan's update>

Bogdan,
   Did you check the error or stdout files created by the python script?
I'm curious if there is something in there indicating an issue.  It's
been quite a while since I wrote it and at the time I was able to
successfully update using the XML/RPC API via the sipxproc tool.

Raymond,
I checked the output and error files as you suggested and it seemed that i had some problems with yum. It had some unfinished transactions and that was probably interpreted as an error thus resultin in updates blocking. However, i removed the transactions and now, there are no more errors in the err file but the update still blocks somehow. I checked the output and it looks good but it stops at :

============================== Entering rpm code ===============================
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : sipxportlib 1/46

I checked the python process (python /home/bogdan/work/BUILD/../INSTALL/bin/sipx-swadmin.py update) and the yum process (/usr/bin/python /usr/bin/yum update -y) and they apparently are in the S state, that meaning they are sleeping. I don't understand what happens. I will leave it some more time to finish, but i doubt this is normal, as a manually update takes several minutes. However, if you have any ideas i will be really happy to look at them and test them.
_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev

Reply via email to