Re: [Openstack] novnc zombie processes

2012-09-06 Thread pf shineyear
i have this problem too~~

root 23044  0.0  0.0  0 0 ?ZSep06   0:00 [python]
defunct
root 23045  0.0  0.0  0 0 ?ZSep06   0:00 [python]
defunct
root 23046  0.0  0.0  0 0 ?ZSep06   0:00 [python]
defunct
root 23047  0.0  0.0  0 0 ?ZSep06   0:00 [python]
defunct
root 23048  0.0  0.0  0 0 ?ZSep06   0:00 [python]
defunct
root 23049  0.0  0.0  0 0 ?ZSep06   0:00 [python]
defunct



On Fri, Sep 7, 2012 at 10:30 AM, Joe Topjian joe.topj...@cybera.ca wrote:

 Hello,

 I'm seeing an issue where novnc is leaving behind zombie python processes
 after a user launches a VNC session. Has anyone else seen this issue or
 know how to fix it?

 I'm running OpenStack Essex on Ubuntu 12.04

 novnc 2012.1~e3+dfsg+1-2
 python-novnc 2012.1~e3+dfsg+1-2

 Please let me know if anyone needs additional information.

 Thanks,
 Joe


 --
 Joe Topjian
 Systems Administrator
 Cybera Inc.

 www.cybera.ca

 Big data is coming to Canada. Join the welcome wagon.
 *Cyber Summit 2012*
 October 1-3, Banff
 www.cybera.ca/summit2012

 Cybera is a not-for-profit organization that works to spur and support
 innovation, for the economic benefit of Alberta, through the use
 of cyberinfrastructure.


 ___
 Mailing list: https://launchpad.net/~openstack
 Post to : openstack@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~openstack
 More help   : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


[Openstack] why swift proxy server use poll not epoll??

2011-12-11 Thread pf shineyear
hi all , can any one tell my the reson of swift proxy server http service
use python eventlet poll not epoll?

i think epoll is more effcient than poll and if i just use one process,
many upload action at same time, poll will not work well i think.

thanks.
___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] use php to make container public or not

2011-12-06 Thread pf shineyear
sorry , i did not use keystone

On Tue, Dec 6, 2011 at 7:10 PM, crayon_z crayon@gmail.com wrote:

 **
 Hi, pf shineyear.

 It seems that you use swauth or tempauth as the auth system for Swift.
 Have you tried the keystone auth system? How to make a container private
 with keystone auth system? It seems that all the containers created are
 public.

 Thanks.

 --
 Crayon

  *Sender:* pf shineyear shin...@gmail.com
 *Date:* 2011年11月23日(星期三) 下午12:47
 *To:* openstack openstack@lists.launchpad.net
 *Subject:* [Openstack] use php to make container public or not
  php curl have a shit feature: can not post an empty http header, so if
 you want to perform a command like this in php:

 swift -A http://10.38.10.127:8080/auth/v1.0 -U AUTH_testa27:AUTH_testu27
 -K testp post -r ' ' mycontainer2

 the X-Container-Read will not be send, so you can not make a container
 unpublic from public

 i write an example code to show how make it work with php, just use ' not
  and plus \n at the end

 hope can make some help


 ?php

 $prefix = AUTH_;
 $account_name = $prefix.testa27;
 $user_name = $prefix.testu27;
 $user_pass = testp;
 $container = mycontainer2;
 $user_token = AUTH_tkb21f5fcfea144cf9a99ed1de9a577db2;
 $path = /v1/.$account_name./.$container;


 #if you want to make container public use this
 #$http_headers = array(X-Auth-Token: .$user_token,
 'X-Container-Read: .r:*');

 #if you want to make container not public use this
 $http_headers = array(X-Auth-Token: .$user_token, 'X-Container-Read:
 \n');

 print_r($http_header);

 $ch = curl_init();

 curl_setopt($ch, CURLOPT_URL, http://10.38.10.127:8080.$path);
 curl_setopt($ch, CURLOPT_POST, 1);
 curl_setopt($ch, CURLOPT_HTTPHEADER, $http_headers);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
 curl_setopt($ch, CURLINFO_HEADER_OUT, true);

 print test set container public\n;

 curl_exec($ch);

 $headers = curl_getinfo($ch, CURLINFO_HEADER_OUT);

 print_r($headers);

 if (!curl_errno($ch))
 {
 $info = curl_getinfo($ch);

 if ((int)($info['http_code'] / 100) != 2)
 {
 print set container public return error
 .$info['http_code'].\n;
 return -1;
 }
 }
 else
 {
 print set container public error\n;
 return -2;
 }

 curl_close($ch);

 ?

___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


Re: [Openstack] use php to make container public or not

2011-12-06 Thread pf shineyear
why you do not try to swauth? it's create enough i think...

On Tue, Dec 6, 2011 at 7:10 PM, crayon_z crayon@gmail.com wrote:

 **
 Hi, pf shineyear.

 It seems that you use swauth or tempauth as the auth system for Swift.
 Have you tried the keystone auth system? How to make a container private
 with keystone auth system? It seems that all the containers created are
 public.

 Thanks.

 --
 Crayon

  *Sender:* pf shineyear shin...@gmail.com
 *Date:* 2011年11月23日(星期三) 下午12:47
 *To:* openstack openstack@lists.launchpad.net
 *Subject:* [Openstack] use php to make container public or not
  php curl have a shit feature: can not post an empty http header, so if
 you want to perform a command like this in php:

 swift -A http://10.38.10.127:8080/auth/v1.0 -U AUTH_testa27:AUTH_testu27
 -K testp post -r ' ' mycontainer2

 the X-Container-Read will not be send, so you can not make a container
 unpublic from public

 i write an example code to show how make it work with php, just use ' not
  and plus \n at the end

 hope can make some help


 ?php

 $prefix = AUTH_;
 $account_name = $prefix.testa27;
 $user_name = $prefix.testu27;
 $user_pass = testp;
 $container = mycontainer2;
 $user_token = AUTH_tkb21f5fcfea144cf9a99ed1de9a577db2;
 $path = /v1/.$account_name./.$container;


 #if you want to make container public use this
 #$http_headers = array(X-Auth-Token: .$user_token,
 'X-Container-Read: .r:*');

 #if you want to make container not public use this
 $http_headers = array(X-Auth-Token: .$user_token, 'X-Container-Read:
 \n');

 print_r($http_header);

 $ch = curl_init();

 curl_setopt($ch, CURLOPT_URL, http://10.38.10.127:8080.$path);
 curl_setopt($ch, CURLOPT_POST, 1);
 curl_setopt($ch, CURLOPT_HTTPHEADER, $http_headers);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
 curl_setopt($ch, CURLINFO_HEADER_OUT, true);

 print test set container public\n;

 curl_exec($ch);

 $headers = curl_getinfo($ch, CURLINFO_HEADER_OUT);

 print_r($headers);

 if (!curl_errno($ch))
 {
 $info = curl_getinfo($ch);

 if ((int)($info['http_code'] / 100) != 2)
 {
 print set container public return error
 .$info['http_code'].\n;
 return -1;
 }
 }
 else
 {
 print set container public error\n;
 return -2;
 }

 curl_close($ch);

 ?

___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


[Openstack] swift urlencode

2011-12-06 Thread pf shineyear
hi all , i just found that swift use urllib.quote and urllib.unquote to
process request url.

but in php urlencode or rawurlencode process result is very different from
python's

for example:

org:  http://www.brighthost.com/test space~.html

php urlencode:  http%3A%2F%2Fwww.brighthost.com%2Ftest+space%7E.html

php rawurlencode: http%3A%2F%2Fwww.brighthost.com%2Ftest%20space~.html

python quote:  http%3A//www.brighthost.com/test%20space%7E.html


so , if you want to send a request to swift, you'd better write a encode
funtion by yourself..
___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


[Openstack] slogging GMT time

2011-12-06 Thread pf shineyear
all swift use UTC time (gmtime) not local time

so if any one want to analysis the log or write some plugin for slogging,
please comfirm you already exchange your time to UTC time

or your total calculate will not correct
___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


[Openstack] slogging plugin development document

2011-12-05 Thread pf shineyear
hi all, i write a document about swift slogging system plugin development

you can get it at http://wiki.openstack.org/development/swift/slogging

if some one can put it into swift development document , i will thanks.
___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


[Openstack] development document: about swift slogging system

2011-12-01 Thread pf shineyear
hi all

i write a document about openstack swift distributed log system slogging

http://wiki.openstack.org/development/swift/slogging

if some one can put it into the development document i will very appreciate.

thanks.
___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


[Openstack] development document: how to write a filter module to swift

2011-11-29 Thread pf shineyear
http://wiki.openstack.org/development/swift/filter

it's not perfect but i think this can help some people at the beginning.

if someone can help me to move this document to Swift Developer
Documentation http://swift.openstack.org/

i will say thank you.
___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


[Openstack] some of my understand of swift object replication (chinese and english)

2011-11-29 Thread pf shineyear
1。 当 proxy 传输成功节点数量 只有 2 的时候, 谁去补全第三个节点? 怎么补的?

when there is just 2 object server transfer success, who will fill up the
failed one?how?

如果只有三个节点, 两个挂了, 写入失败

if there are 3 object server, 2 node failed, upload fail.

如果只有三个节点, 一个挂了, 三次写入都成功, 另一次失败的写入会被 proxy 转写到 另外的两个节点中的一个, 由于 partition 不同,
所以虽然文件内容相同, 但在同一台机器上是不同的路径, 这样在 replicator 进程中就可以根据 ring
的值判断出某个路径里的文件是不属于这台服务器的, 从而当挂掉的节点恢复后可以被同步。

if there are 3 object server, 1 node failed and 3 times transfer all
success, the one of 3, is uploaded to an available server (one of the 2
available server), because the partition is different , so dir and hash
value is different even in the same machine. so, replicator process will
fine this upload file which not belong this server(scan all files in the
server and use ring file to calculate which file not belong), and when the
failed node become available, it will be rsync back.

如果只有三个节点, 一个挂了, 三次写入只有两次成功, 另一次的写入失败是由于网络原因引起的写入超时, 那么写入的文件是不完整的, auditor
进程会将不完整的文件 rename 到 quarantine 目录以进行文件修复

if there are 3 object server, 1 node failed and 3 times transfer just
successed 2, the failed one because the network problem timeout when it
already transfer some. auditor process will move the not complete file to
quarantine dir to repair it.

2。 通过 hash suffix 来判断文件是否被更改, 怎么判断被更改的时间先后顺序?怎么能肯定是最新的呢?

how to comfirm file changed through hash suffix? how to make sure which
change is the newest one?

通过 proxy server 传递到 object server 上的 x-timestemp 时间来判断, 必须实用 NTP 来同步所有
proxy server 的时间 否则会有一致性问题

when file upload , proxy server will send a x-timestemp http header to
every object server, it’s the current time on proxy server , so use this
timestemp you can find which one is new and which one is old. you must use
NTP server to keep every proxy server have the same time.

here is the response mail about that question from core developer of swift

On Mon, Nov 28, 2011 at 9:04 PM, pf shineyear shin...@gmail.com wrote:
 hi all
 i think X-Timestamp header is come from the proxy servery to object
storage
 node, the value is proxy server current time.
 if i have 2 or more proxy server run in one cluster, should i comfirm same
 account/container/filename use same proxy server?
 because if i upload one file 2 times use different proxy server, the
server
 time is different, and i think there maybe have some consistent problem
if i
 do so. am i right??

Yeah, Swift's last write wins logic is only as good as proxy server
times are synchronized.  The idea is you'd use NTP or similar to keep
them synced.

And NTP generally does a really good job, with clock skews an order of
magnitude smaller than the time it takes to PUT an object into Swift
(which is about the best conflict resolution level you could hope for
anyways).

We talked a lot about using logical clocks (e.g. vector clocks) when
designing Swift, but realistically they'd probably usually just have
to fall back on timestamps to resolve conflicts.  Or version objects
when there's a conflict and let the client decide which is right,
and that's a whole mess for both the clients and the backend.

We've also talked about tie breaker ideas, because there's only so
much resolution in those timestamps.  But in reality, it's a pretty
low priority because it's really difficult to exploit and only screws
up the user's own data if they manage it.

- Mike



3。 两个节点同时向一个重启的节点发送同步文件, 不会被覆盖或写花么?

if 2 object server replicator process rsync one file to anothor object
server at same time, how to guarantee file not be cover or overlap write?

通过对目录进行读写锁控制

use fcntl to add the read/write lock to the parent dir.
___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp


[Openstack] question about X-Timestamp header

2011-11-28 Thread pf shineyear
hi all

i think X-Timestamp header is come from the proxy servery to object storage
node, the value is proxy server current time.

if i have 2 or more proxy server run in one cluster, should i comfirm same
account/container/filename use same proxy server?

because if i upload one file 2 times use different proxy server, the server
time is different, and i think there maybe have some consistent problem if
i do so. am i right??

thanks.
___
Mailing list: https://launchpad.net/~openstack
Post to : openstack@lists.launchpad.net
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp