[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Openshift Orig i nManuallydeploy fail.Followoo_deploy_guide_comprehensive

+++ ┍ζυκε┙ [16/12/13 20:28 +0800]:
I get some more message in node host.
I think the problem is cause by SELinux.
When I try to create a php application, the message do send to the node host!

/var/log/mcollective.log shows that the node host try to create php application three times but fail:
I, [2013-12-16T19:58:11.526390 #30715]  INFO -- : openshift.rb:134:in `execute_action' Executing action [app-create] using method oo_app_create with args [{"--with-app-uuid"=>"52aeeace6892dfae5d000014", "--with-app-name"=>"php", "--with-container-uuid"=>"52aeeace6892dfae5d000014", "--with-container-name"=>"php", "--with-namespace"=>"test", "--with-request-id"=>"9f1cdae4b8a89cbf56ffb9c9644ce4f0", "--with-secret-token"=>"MbESBa69TsX_jYzGA1sUPEgYIeKRtUEXWZHROz1P5XaIqL1qmUIi0nFhOO_voBCJVUMeFpMiDA83HSdN_2bBV1edFpCVywLIRSlbavTDjdD15NvE5iqufBJOCtVblCLR", "--cart-name"=>"openshift-origin-node"}]
I, [2013-12-16T19:58:12.601221 #30715]  INFO -- : openshift.rb:338:in `rescue in oo_app_create' Invalid argument - Could not set the file context system_u:object_r:openshift_var_lib_t:s0:c0,c1000 on /var/lib/openshift/52aeeace6892dfae5d000014/.env/GEM_HOME

oo-diagnostics -v:
oo-accept-node had errors:
FAIL: SELinux context for ruby193-mcollective is incorrect

FAIL: test_mcollective_context
     Mcollectived is not running in the expected SELinux context, which
     may result in node execution failures. Please check that the correct
     context is set on /usr/sbin/mcollectived and that the correct SELinux
     policies are loaded.
       Expected: system_r:openshift_initrc_t:s0-s0:c0.c1023
       Found: unconfined_r:unconfined_t:s0-s0:c0.c1023

The /usr/sbin/mcollectived is not exist.
It has mcollectived in /opt/rh/ruby193/root/usr/sbin/

here are some relative informations:
[root node init.d]# ls -Z openshift-*
-rwxr-xr-x. root root system_u:object_r:initrc_exec_t:s0 openshift-gears
-rwxr-xr-x. root root system_u:object_r:initrc_exec_t:s0 openshift-iptables-port-proxy
-rwxr-xr-x. root root system_u:object_r:initrc_exec_t:s0 openshift-node-web-proxy
-rwxr-xr-x. root root system_u:object_r:initrc_exec_t:s0 openshift-port-proxy
-rwxr-xr-x. root root system_u:object_r:initrc_exec_t:s0 openshift-tc

-rwxr-xr-x. root root system_u:object_r:initrc_exec_t:s0 ruby193-mcollective

[root node sbin]# ls -Z mcollectived
-rwxr-xr-x. root root system_u:object_r:default_t:s0   mcollectived

And I copy above file to /usr/sbin/ and run restorcon
[root node sbin]# ls -Z mcollectived
-rwxr-xr-x. root root unconfined_u:object_r:openshift_initrc_exec_t:s0 mcollectived

Are there some hints to fix the problem? Thanks a lot~

What is the output of the following command on your system?:

rpm -qa | grep selinux | sort

------------------ Original ------------------
Sender: "┍ζυκε┙"<yuanzilu foxmail com>;
Send time: Monday, Dec 16, 2013 7:01 PM
To: "┍ζυκε┙"<yuanzilu foxmail com>; "Brenton Leanhardt"<bleanhar redhat com>;
Cc: "users"<users lists openshift redhat com>;
Subject: 回复: Openshift Orig i nManuallydeploy fail.Followoo_deploy_guide_comprehensive

I just fixed the mcollective error, the deployment-guide's server.cfg example has a little mistake. The path of facts.yaml is wrong.

The Node host still has SELinux context error.
The Broker host broker log(/var/log/openshift/broker/httpd/error_log) show something errors.
1.connect to broker.example.com failed: getaddrinfo: Temporary failure in name resolution will retry(#xxx) in xx
2.when I create a php application,  it occur errors.
    [pid=xxx thr=xxx file=utils.rb:176 time=xxx]: Exception NameError in Rack application object(undefined local variable or method 'error_code' for #<ApplicationsController:0x000XXXXXX>(process 6131, thread xxx)
   [pid=xxx thr=xxx file=ext/apach2/Hooks.cpp:834 time=xxx]: No data receive from the backend application(process 6131) within 5000ms


I just re-deployed the node and it still had SELinux context error.
So I re-deploy again.
At this time, I check the mcollective.log carefully.
When the ruby193-mcollective start at first time, I find two error.

E, [2013-12-16T17:18:59.827554 #10356] ERROR -- : pluginmanager.rb:171:in `rescue in loadclass' Fail
ed to load MCollective::Agent::Openshift: error loading openshift-origin-container-selinux: cannot l
oad such file -- openshift-origin-container-selinux
E, [2013-12-16T17:18:59.827652 #10356] ERROR -- : agents.rb:71:in `rescue in loadagent' Loading agen
t openshift failed: error loading openshift-origin-container-selinux: cannot load such file -- opens

D, [2013-12-16T17:18:59.836314 #10356] DEBUG -- : pluginmanager.rb:44:in `<<' Registering plugin age
nt_data with class MCollective::Data::Agent_data single_instance: false

D, [2013-12-16T17:18:59.836838 #10356] DEBUG -- : pluginmanager.rb:44:in `<<' Registering plugin fst
at_data with class MCollective::Data::Fstat_data single_instance: false

My selinux-policy version is 3.7.19.
I follow http://openshift.github.io/documentation/oo_deployment_guide_comprehensive.html to deploy.
I use ruby193-mcollective.
"oo-mco ping" can work.


+++ ┍ζυκε┙ [16/12/13 16:18 +0800]:
I am deploying the node, and I need time to finish it.
I think it can connect to ActiveMQ, here are some log messages.

[2013-12-16T15:56:36.526150 #9892] DEBUG -- : pluginmanager.rb:167:in `loadclass' Loading Mcollec
tive::Connector::Activemq from mcollective/connector/activemq.rb

[2013-12-16T15:56:36.527879 #9892] DEBUG -- : pluginmanager.rb:44:in `<<' Registering plugin conn
ector_plugin with class MCollective::Connector::Activemq single_instance: true

[2013-12-16T15:56:36.537249 #9900] DEBUG -- : pluginmanager.rb:80:in `[]' Returning new plugin co
nnector_plugin with class MCollective::Connector::Activemq

[2013-12-16T15:56:36.537508 #9900] DEBUG -- : activemq.rb:171:in `block in connect' Adding broke
.example.com:61613 to the connection pool

[2013-12-16T15:56:36.577311 #9900] DEBUG -- : agents.rb:104:in `block in findagentfile' Found ope
nshift at /opt/rh/ruby193/root/usr/libexec/mcollective/mcollective/agent/openshift.rb

E, [2013-12-16T15:56:36.755698 #9900] ERROR -- : pluginmanager.rb:171:in `rescue in loadclass' Faile
d to load MCollective::Agent::Openshift: error loading openshift-origin-frontend-apache-mod-rewrite:
cannot load such file -- openshift-origin-frontend-apache-mod-rewrite

--To solve this error, I install the package manually--

Yes, that error would cause the OpenShift Agent not to load and would
result in the Broker not being able to find nodes.  If you have fixed
that error I would expect 'oo-mco ping' to work on your Broker.

Another source of 'oo-mco ping' not working is clock skew on the
hosts.  Are they running ntp?  Does running 'date' on both systems
show their clocks to be in sync?

D, [2013-12-16T15:56:36.767574 #9900] DEBUG -- : pluginmanager.rb:83:in `[]' Returning cached plugin
connector_plugin with class MCollective::Connector::Activemq

users mailing list
users lists openshift redhat com


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]