Re: 答复: Re: Re: Cloud Foundry deploy on suse


Youzhi Zhu
 

Hi shengjun

Thank you for your solution, now we can deploy apps success on CF based
suse OS. The only thing that not perfect is that when set the parameter
"disk_quota_enabled" of warden to "true", the app cannot start
successfully, and the warden log report as follow:

*{"timestamp":1448341389.3761559,"message":"Exited with status 1 (0.004s):
[[\"/var/vcap/data/packages/warden/43/warden/src/closefds/closefds\",
\"/var/vcap/data/packages/warden/43/warden/src/closefds/closefds\"],
\"/var/vcap/data/packages/warden/43/warden/src/repquota/repquota\", \"/\",
\"20000\"]","log_level":"warn","source":"Warden::Container::Linux","data":{"stdout":"","stderr":"Failed
retrieving quota for uid=20000: Block device doesn't
exist.\n"},"thread_id":7286900,"fiber_id":12257000,"process_id":9202,"file":"/var/vcap/data/packages/warden/43/warden/lib/warden/container/spawn.rb","lineno":135,"method":"set_deferred_success"}*

If set this parameter to "false", the app can start successfully. have you
ever met this problem when deploy on suse before. thanks!


2015-11-20 14:24 GMT+08:00 Tangshengjun (A) <tangshengjun(a)huawei.com>:

We encountered this and resolved.



Use this command: mount --make-rprivate /

Which followed this web:
http://gaijin-nippon.blogspot.in/2012/10/lxc-pivotroot-fails-on-shared-mount.html



And there are many same problems which you can as a reference:

https://github.com/docker/docker/issues/11382

https://github.com/docker/docker/issues/1751

https://github.com/lxc/lxc/issues/61

http://linux.die.net/man/8/mount




------------------------------

唐盛军
华为技术有限公司 Huawei Technologies Co., Ltd.


Phone: 13777864354
Fax:
Mobile: 13777864354
Email: tsjsdbd(a)huawei.com
地址:杭州市江虹路410号华为基地 邮编:310052
Huawei Technologies Co., Ltd.
JiangHong road 410,BingJiang District,Hangzhou 310052, P.R.China
http://www.huawei.com
------------------------------

本邮件及其附件含有华为公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁
止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中
的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
This e-mail and its attachments contain confidential information from
HUAWEI, which
is intended only for the person or entity whose address is listed above.
Any use of the
information contained herein in any way (including, but not limited to,
total or partial
disclosure, reproduction, or dissemination) by persons other than the
intended
recipient(s) is prohibited. If you receive this e-mail in error, please
notify the sender by
phone or email immediately and delete it!

*发件人:* Youzhi Zhu [mailto:zhuyouzhi03(a)gmail.com]
*发送时间:* 2015年11月5日 15:09
*收件人:* Discussions about Cloud Foundry projects and the system overall.
*主题:* [cf-dev] Re: Re: Cloud Foundry deploy on suse



Hi Matthew



I also guess it is something wrong with the file system type, then I
checked the file system type when mount rootfs_lucid64 to container depot
path "mnt/", it's overlayfs for suse other than aufs for ubuntu10.04, but
it does support overlayfs for if you changed to overlayfs on ubuntu10.04,
the app can alslo be started successfully.



After that I found when stack the container file system, the command
"mount" exec with "-n" option, which means do not write the mount info to
/etc/mtab, but when exec on suse, it does write to the /proc/mtab. Another
strange phenomenon is that the mount command is called by "unshare -m",
which means do not share mount namespace with the calling process, but I
can see the mounted files in the calling UTS namespace in fact, even add
the "--make-rprivate" option to command mount does not work. that
confused me too much.





2015-11-04 23:37 GMT+08:00 Matthew Sykes <matthew.sykes(a)gmail.com>:

wshd is simply reporting [1] the pivot_root [2] failure. It looks like
you're getting an EINVAL from the call which implies warden is running in
an unexpected environment.



If I were to guess, I'd say that the container depot does not live on an
expected file system type or location...



As far as I'm aware, no work has been done to make warden run under
anything but Ubuntu or CentOS recently but it's possible someone has. If
nobody else has any hints, you'll likely have to look through the code and
work out what's going on.



[1]:
https://github.com/cloudfoundry/warden/blob/76010f2ba12e41d9e8755985ec874391fb3c962a/warden/src/wsh/wshd.c#L715

[2]: http://man7.org/linux/man-pages/man2/pivot_root.2.html



On Wed, Nov 4, 2015 at 7:27 AM, Youzhi Zhu <zhuyouzhi03(a)gmail.com> wrote:

Hi all

We are trying to deploy cloud foundry on suse, now every CF module can
start successfully, but when I push an app to CF, it occurred error, I
checked the logs and found when start the container, the wshd process throw
error "pivot_root: Invalid argument", anyone has seen this error before or
anyone has deploy CF to other OS successfully except ubuntu?thanks.



CF version is cf-release170

suse version is suse 12 with kernel 3.12.28-4-default





--

Matthew Sykes
matthew.sykes(a)gmail.com


Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.