Description of problem: See https://openshift.redhat.com/community/forums/openshift/rhc-app-create-errors#comment-22460 --- cheeky@linuxmint /media/Archive/Work/Sandbox/OpenShiftStage $ rhc app create -a testpiwik -t php-5.3 Password: Creating application: testpiwik in cheekymonk3y Now your new domain name is being propagated worldwide (this might take a minute)... Cleaning up application /usr/lib/ruby/1.8/resolv.rb:885:in <code>lazy_initialize': undefined method</code>include?' for nil:NilClass (NoMethodError) from /usr/lib/ruby/1.8/resolv.rb:864:in <code>synchronize' from /usr/lib/ruby/1.8/resolv.rb:864:in</code>lazy_initialize' from /usr/lib/ruby/1.8/resolv.rb:337:in <code>lazy_initialize' from /usr/lib/ruby/1.8/resolv.rb:335:in</code>synchronize' from /usr/lib/ruby/1.8/resolv.rb:335:in <code>lazy_initialize' from /usr/lib/ruby/1.8/resolv.rb:477:in</code>each_resource' from /usr/lib/ruby/1.8/resolv.rb:468:in <code>getresources' from /var/lib/gems/1.8/gems/rhc-0.94.8/lib/rhc-common.rb:468:in</code>hostexist?' from /var/lib/gems/1.8/gems/rhc-0.94.8/lib/rhc-common.rb:582:in <code>create_app' from /var/lib/gems/1.8/gems/rhc-0.94.8/bin/rhc-app:227:in</code>create_app' from /var/lib/gems/1.8/gems/rhc-0.94.8/bin/rhc-app:502 from /usr/local/bin/rhc-app:19:in `load' from /usr/local/bin/rhc-app:19 ---
Can you tell us what version of the tools were you running, if you know? Thank you
Clayton to determine if this is specific to Mint or Ruby or?
I tried pinging the user on IRC, but he didn't get back to me. In reading his stack trace (http://pastebin.com/46RpijFq), it looks like there was an error actually initializing DNS (maybe his OS is doing something funky). That code section is trivial and I tried a few different things, like using a bogus/nil hostname, and couldn't get an error like that. Unless we can confirm that this is some sort of bug/setting with Mint doing DNS lookups, I would say this was a one off problem.
Lowering severity because of unreproducibility
We must temporarily erase except "hosts:dns files" line because ruby 1.8.7 doesn't support NIS services. if we have root access for openshift we have replace with a small backup of /etc/nsswitch.conf for instances are online and openshift domain is already registered to nsswitch as a local domain. Any patching solution here(bugzilla)? I can patch it.
I've got same error. Running Deepin 12.06 (Ubuntu based) and ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
Checked on latest rhc client 0.99.1 with Mint Linux 13 x64. Get the same issue. But app can be created successfully with '-n --no-dns' option. And can be git cloned after that. ================== openshift-VM openshift # rhc app create -a php1 -t php-5.3 -p<hidden> -n --no-dns Creating application: php1 in bmengpro !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! IMPORTANT: Since the -n flag was specified, no local repo has been created. This means you can't make changes to your published application until after you clone the repo yourself. See the git url below for more information. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! git url: ssh://53cfbf6a0203473b9b95a49b3f4156f7.com/~/git/php1.git/ Successfully created application: php1
Ok, so I confirmed this is indeed an issue with Ruby 1.8 not being able to find `/etc/resolv.conf`. It appears that Mint 13 uses NIS instead of DNS. This breaks Resolv::DNS::Config because it returns a nil instead of a hash when parsing the file. Oddly enough, this works in Ruby 1.9 because they assign an empty hash [1] but 1.8.7 just leaves it as nil[2]. I've added a patch[3] that appears to work by emulating the 1.9 behavior by explicitly initializing the config object (therefore bypassing the need to monkey patch the DNS::Config lazy_initialize methods). I'm not entirely sure how Resolv::DNS performs the lookup without that information, but my testing indicates it is getting the correct address. My guess it either delegates it to the system directly or creates some sort of socket to the address to let the system handle the connection. [1]: https://github.com/ruby/ruby/blob/ruby_1_9_3/lib/resolv.rb#L902 [2]: https://github.com/ruby/ruby/blob/ruby_1_8_7/lib/resolv.rb#L860 [3]: https://github.com/openshift/rhc/pull/220
I'll verify it once 1.1.8 is published.
Checked on Mint 13 x64 ruby version: 1.8.7 rhc version: 1.1.8 openshift-VM lib # rhc app create -a php2 -t php-5.3 -p123 Creating application 'php2' =========================== Scaling: no Cartridge: php-5.3 Namespace: bmengdev1 Gear Size: default Your application's domain name is being propagated worldwide (this might take a minute)... /usr/lib/ruby/1.8/resolv.rb:885:in `lazy_initialize': undefined method `include?' for nil:NilClass (NoMethodError) from /usr/lib/ruby/1.8/resolv.rb:864:in `synchronize' from /usr/lib/ruby/1.8/resolv.rb:864:in `lazy_initialize' from /usr/lib/ruby/1.8/resolv.rb:337:in `lazy_initialize' from /usr/lib/ruby/1.8/resolv.rb:335:in `synchronize' from /usr/lib/ruby/1.8/resolv.rb:335:in `lazy_initialize' from /usr/lib/ruby/1.8/resolv.rb:477:in `each_resource' from /usr/lib/ruby/1.8/resolv.rb:468:in `getresources' from /var/lib/gems/1.8/gems/rhc-1.1.8/lib/rhc/commands/app.rb:326:in `host_exist?' from /var/lib/gems/1.8/gems/rhc-1.1.8/lib/rhc/commands/app.rb:310:in `dns_propagated?' from /var/lib/gems/1.8/gems/rhc-1.1.8/lib/rhc/commands/app.rb:309:in `each' from /var/lib/gems/1.8/gems/rhc-1.1.8/lib/rhc/commands/app.rb:309:in `dns_propagated?' from /var/lib/gems/1.8/gems/rhc-1.1.8/lib/rhc/commands/app.rb:92:in `create' from /var/lib/gems/1.8/gems/rhc-1.1.8/lib/rhc/commands.rb:129:in `send' from /var/lib/gems/1.8/gems/rhc-1.1.8/lib/rhc/commands.rb:129:in `to_commander' from /var/lib/gems/1.8/gems/commander-4.1.2/lib/commander/command.rb:180:in `call' from /var/lib/gems/1.8/gems/commander-4.1.2/lib/commander/command.rb:180:in `call' from /var/lib/gems/1.8/gems/commander-4.1.2/lib/commander/command.rb:155:in `run' from /var/lib/gems/1.8/gems/commander-4.1.2/lib/commander/runner.rb:402:in `run_active_command' from /var/lib/gems/1.8/gems/rhc-1.1.8/lib/rhc/command_runner.rb:58:in `run!' from /var/lib/gems/1.8/gems/commander-4.1.2/lib/commander/delegates.rb:7:in `run!' from /var/lib/gems/1.8/gems/rhc-1.1.8/lib/rhc/cli.rb:40:in `start' from /var/lib/gems/1.8/gems/rhc-1.1.8/bin/rhc:21 from /usr/local/bin/rhc:19:in `load' from /usr/local/bin/rhc:19
Ok, so this was being called in two different places. I've made the change to make sure there is only one function that actually does the DNS check. https://github.com/openshift/rhc/pull/226
Checked with rhc-1.1.9 on devenv-stage_254, issue has been fixed. openshift-VM openshifttest # rhc app create -a testapp -t php-5.3 -pxxx Creating application 'testapp' ============================== Scaling: no Gear Size: default Namespace: bmengdev1 Cartridge: php-5.3 Your application's domain name is being propagated worldwide (this might take a minute)... Cloning into 'testapp'... done testapp @ http://testapp-bmengdev1.dev.rhcloud.com/ =================================================== Application Info ================ Gear Size = small Created = 4:47 AM UUID = d9570420595a4cb5ab11ec5349fc3744 Git URL = ssh://d9570420595a4cb5ab11ec5349fc3744.rhcloud.com/~/git/testapp.git/ SSH URL = ssh://d9570420595a4cb5ab11ec5349fc3744.rhcloud.com Cartridges ========== php-5.3 RESULT: Application testapp was created.