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

Re: On adding node to a district



I see. There are two hostnames here. One is the original node hostname (1). The other is the node hostname used in openshift (2) when openshift is acting as the nameserver.

I supply (2) and it spits the error. I supply (1) and it works...

It would be great if the behaviors are unified. Thanks.

- JC


On 6/5/15 4:25 pm, Jimmy Chu wrote:

Hi,

I am trying to add a node to a district with

oo-admin-ctl-district -c add-node -n <district> -i <node hostname>

Then it spits out error

/usr/sbin/oo-admin-ctl-district:215:in `block in <main>': undefined method `casecmp' for nil:NilClass (NoMethodError)
  from /usr/sbin/oo-admin-ctl-district:178:in `block in collate_errors'
  ...

I looked in the src a bit, and it is at the point

  when "add-node"
    ...
    collate_errors(server_identity, reply) do |server|
      kernel = OpenShift::MCollectiveApplicationContainerProxy.rpc_get_fact("kernel", server) {|_, _|}
      if kernel.casecmp(district.attributes["platform"]) == 0  # this is line 215
        district.add_node(server, region, zone)
      else
    reply.resultIO << "Cannot add a node with platform '#{kernel}' to a district with platform '#{district.attributes["platform"]}'"
      end
    end

where kernel is nil and thus the problem. I can easily add if kernel.nil? || ..., but I don’t understand why mcollective is not working for me. I am pasting oo-accept-broker -v, oo-accept-node -v (of the node I want to add), and oo-accept-systems -v here. I appreciate if you could shed me some light on this. Thanks.

oo-accept-broker -v

INFO: Broker package is: openshift-origin-broker
INFO: checking packages
INFO: checking package rubygem-openshift-origin-common
INFO: checking package rubygem-openshift-origin-controller
INFO: checking package openshift-origin-broker
INFO: checking package ruby193-rubygem-rails
INFO: checking package ruby193-rubygem-passenger
INFO: checking package ruby193-rubygems
INFO: checking ruby requirements
INFO: checking ruby requirements for openshift-origin-controller
INFO: checking ruby requirements for config/application
INFO: checking that selinux modules are loaded
NOTICE: SELinux is Permissive
INFO: checking that selinux booleans are correct
NOTICE: SELinux is Permissive
INFO: checking firewall settings
FAIL: service iptables not running
INFO: checking services
INFO: checking mongo datastore configuration
INFO: Datastore Host: broker01.oo.cnpaas.localhost
INFO: Datastore Port: 27017
INFO: Datastore User: openshift
INFO: Datastore SSL: false
INFO: Datastore Password has been set to non-default
INFO: Datastore DB Name: openshift_broker
INFO: Datastore: mongo db service is remote
INFO: checking mongo db login access
INFO: mongo db login successful: broker01.oo.cnpaas.localhost:27017/openshift_broker --username openshift
INFO: checking cloud user authentication
INFO: auth plugin = OpenShift::RemoteUserAuthService
INFO: auth plugin: OpenShift::RemoteUserAuthService
INFO: checking remote-user auth configuration
INFO: Auth trusted header: REMOTE_USER
grep: /var/www/openshift/broker/httpd/conf.d/*.conf: No such file or directory
FAIL: Auth passthrough appears not to be enabled, which will break JBossTools and node-to-broker authentication and authentication tokens
INFO: Got HTTP 200 response from https://localhost/broker/rest/api
INFO: Got HTTP 200 response from https://localhost/broker/rest/cartridges
INFO: Got HTTP 401 response from https://localhost/broker/rest/user
INFO: Got HTTP 401 response from https://localhost/broker/rest/domains
INFO: checking dynamic dns plugin
INFO: dynamic dns plugin = OpenShift::NsupdatePlugin
INFO: checking bind dns plugin configuration
INFO: DNS Server: 192.168.33.11
INFO: DNS Port: 53
INFO: DNS Zone: app.cnpaas.localhost
INFO: DNS Domain Suffix: app.cnpaas.localhost
INFO: DNS Update Auth: key
INFO: DNS Key Name: app.cnpaas.localhost
INFO: DNS Key Value: *****
INFO: DNS Key Algorithm: HMAC-MD5
INFO: adding txt record named testrecord.app.cnpaas.localhost to server 192.168.33.11: this_is_a_test
INFO: txt record successfully added
INFO: deleteing txt record named testrecord.app.cnpaas.localhost to server 192.168.33.11: 
INFO: txt record successfully deleted
INFO: checking messaging configuration
INFO: messaging plugin = OpenShift::MCollectiveApplicationContainerProxy
2 ERRORS

oo-accept-node -v

INFO: using default accept-node extensions
INFO: loading node configuration file /etc/openshift/node.conf
INFO: loading resource limit file /etc/openshift/resource_limits.conf
INFO: finding external network device
INFO: checking node public hostname resolution
INFO: checking selinux status
FAIL: selinux is not enabled
INFO: checking selinux booleans
INFO: checking package list
INFO: checking services
INFO: checking kernel semaphores >= 512
INFO: checking cgroups configuration
INFO: checking cgroups processes
INFO: find district uuid: NONE
INFO: determining node uid range: 1000 to 6500
INFO: checking presence of tc qdisc
INFO: checking for cgroup filter
INFO: checking presence of tc classes
INFO: checking filesystem quotas
INFO: checking quota db file selinux label
INFO: checking 0 user accounts
INFO: checking application dirs
INFO: checking system httpd configs
INFO: checking cartridge repository
1 ERRORS

selinux is run in permissive mode in both broker and node.

oo-accept-systems -v

INFO: checking that each public_hostname resolves to external IP
INFO: PUBLIC_HOSTNAME node01.oo.cnpaas.localhost for oo2.cnpaas.localhost resolves to 192.168.33.12
INFO: checking that each public_hostname is unique
INFO: checking that public_ip has been set for all nodes
INFO: PUBLIC_IP 192.168.33.12 for oo2.cnpaas.localhost
INFO: checking that public_ip is unique for all nodes
INFO: checking that all node hosts have cartridges installed
PASS

Thank you.

  • Jimmy Chu


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