You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by "Dies Koper (JIRA)" <ji...@apache.org> on 2012/11/09 13:54:12 UTC

[jira] [Created] (DTACLOUD-362) can't start DC with ./bin/deltacloudd, need to add "ruby"

Dies Koper created DTACLOUD-362:
-----------------------------------

             Summary: can't start DC with ./bin/deltacloudd, need to add "ruby"
                 Key: DTACLOUD-362
                 URL: https://issues.apache.org/jira/browse/DTACLOUD-362
             Project: DeltaCloud
          Issue Type: Bug
          Components: Website
         Environment: CentOS 6.2 (and Win 7)
            Reporter: Dies Koper
            Priority: Minor


I can't start DC with ./bin/deltacloudd:

[root@localhost server]# ./bin/deltacloudd -i mock
: No such file or directory
[root@localhost server]# ls
0001-fgcp-activate-new-ip-as-soon-as-allocated.patch  deltacloud-core.gemspec  LICENSE  Rakefile   tests
bin                                                   Gemfile                  log      README.md  tmp
config                                                Gemfile.lock             NOTICE   support    views
config.ru                                             lib                      public   temp.txt
[root@localhost server]# pwd
/mnt/hgfs/deltacloud/server

but "ruby ./bin/deltacloudd" does work.

See also http://fpaste.org/Qrxk/ and note:
 $ /usr/bin/env ruby --version
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (DTACLOUD-362) can't start DC with ./bin/deltacloudd, need to add "ruby"

Posted by "Michal Fojtik (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DTACLOUD-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michal Fojtik resolved DTACLOUD-362.
------------------------------------

    Resolution: Fixed
      Assignee: Michal Fojtik

commit d7258e2a39e806a7db7ef85745eae5e8661a7dc2
Author: Dies Koper <di...@fast.au.fujitsu.com>
Date:   Sat Nov 10 14:14:31 2012 +1100

    added .gitattributes to prevent git from converting newlines on linux scripts. Also added equivalent batch files
                
> can't start DC with ./bin/deltacloudd, need to add "ruby"
> ---------------------------------------------------------
>
>                 Key: DTACLOUD-362
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-362
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Website
>         Environment: CentOS 6.2 (and Win 7)
>            Reporter: Dies Koper
>            Assignee: Michal Fojtik
>            Priority: Minor
>         Attachments: 0001-added-.gitattributes-to-prevent-git-from-converting-.patch
>
>
> I can't start DC with ./bin/deltacloudd:
> [root@localhost server]# ./bin/deltacloudd -i mock
> : No such file or directory
> [root@localhost server]# ls
> 0001-fgcp-activate-new-ip-as-soon-as-allocated.patch  deltacloud-core.gemspec  LICENSE  Rakefile   tests
> bin                                                   Gemfile                  log      README.md  tmp
> config                                                Gemfile.lock             NOTICE   support    views
> config.ru                                             lib                      public   temp.txt
> [root@localhost server]# pwd
> /mnt/hgfs/deltacloud/server
> but "ruby ./bin/deltacloudd" does work.
> See also http://fpaste.org/Qrxk/ and note:
>  $ /usr/bin/env ruby --version
> ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DTACLOUD-362) can't start DC with ./bin/deltacloudd, need to add "ruby"

Posted by "David Lutterkort (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13494258#comment-13494258 ] 

David Lutterkort commented on DTACLOUD-362:
-------------------------------------------

Hi Dies,

this might be a small shell issue, depending on what shell you are using: it seems that the first line in deltacloudd might be missing a space after the #! - IIRC, there are shells who do not like that.

                
> can't start DC with ./bin/deltacloudd, need to add "ruby"
> ---------------------------------------------------------
>
>                 Key: DTACLOUD-362
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-362
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Website
>         Environment: CentOS 6.2 (and Win 7)
>            Reporter: Dies Koper
>            Priority: Minor
>
> I can't start DC with ./bin/deltacloudd:
> [root@localhost server]# ./bin/deltacloudd -i mock
> : No such file or directory
> [root@localhost server]# ls
> 0001-fgcp-activate-new-ip-as-soon-as-allocated.patch  deltacloud-core.gemspec  LICENSE  Rakefile   tests
> bin                                                   Gemfile                  log      README.md  tmp
> config                                                Gemfile.lock             NOTICE   support    views
> config.ru                                             lib                      public   temp.txt
> [root@localhost server]# pwd
> /mnt/hgfs/deltacloud/server
> but "ruby ./bin/deltacloudd" does work.
> See also http://fpaste.org/Qrxk/ and note:
>  $ /usr/bin/env ruby --version
> ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (DTACLOUD-362) can't start DC with ./bin/deltacloudd, need to add "ruby"

Posted by "Dies Koper (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/DTACLOUD-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dies Koper updated DTACLOUD-362:
--------------------------------

    Attachment: 0001-added-.gitattributes-to-prevent-git-from-converting-.patch

added .gitattributes to prevent git from converting unix scripts
also added equivalent batch files
                
> can't start DC with ./bin/deltacloudd, need to add "ruby"
> ---------------------------------------------------------
>
>                 Key: DTACLOUD-362
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-362
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Website
>         Environment: CentOS 6.2 (and Win 7)
>            Reporter: Dies Koper
>            Priority: Minor
>         Attachments: 0001-added-.gitattributes-to-prevent-git-from-converting-.patch
>
>
> I can't start DC with ./bin/deltacloudd:
> [root@localhost server]# ./bin/deltacloudd -i mock
> : No such file or directory
> [root@localhost server]# ls
> 0001-fgcp-activate-new-ip-as-soon-as-allocated.patch  deltacloud-core.gemspec  LICENSE  Rakefile   tests
> bin                                                   Gemfile                  log      README.md  tmp
> config                                                Gemfile.lock             NOTICE   support    views
> config.ru                                             lib                      public   temp.txt
> [root@localhost server]# pwd
> /mnt/hgfs/deltacloud/server
> but "ruby ./bin/deltacloudd" does work.
> See also http://fpaste.org/Qrxk/ and note:
>  $ /usr/bin/env ruby --version
> ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DTACLOUD-362) can't start DC with ./bin/deltacloudd, need to add "ruby"

Posted by "Dies Koper (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13494451#comment-13494451 ] 

Dies Koper commented on DTACLOUD-362:
-------------------------------------

Found it!
My code is checked out on Windows, I'm using it from CentOS by mounting the deltacloud directory.
deltacloudd shows DOS newlines on CentOS and that seems to be causing the issue.
If I do a tr -d '\r' < deltacloudd > deltacloudd.sh, the latter file works.

How to fix it? Not sure on git, but deltacloudd (being a unix script) should never be checked out with DOS newlines, no matter whether I'm checking out on Linux or Windows.
With svn there are file options to ensure newlines are not changed on particular files. How about git?

                
> can't start DC with ./bin/deltacloudd, need to add "ruby"
> ---------------------------------------------------------
>
>                 Key: DTACLOUD-362
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-362
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Website
>         Environment: CentOS 6.2 (and Win 7)
>            Reporter: Dies Koper
>            Priority: Minor
>
> I can't start DC with ./bin/deltacloudd:
> [root@localhost server]# ./bin/deltacloudd -i mock
> : No such file or directory
> [root@localhost server]# ls
> 0001-fgcp-activate-new-ip-as-soon-as-allocated.patch  deltacloud-core.gemspec  LICENSE  Rakefile   tests
> bin                                                   Gemfile                  log      README.md  tmp
> config                                                Gemfile.lock             NOTICE   support    views
> config.ru                                             lib                      public   temp.txt
> [root@localhost server]# pwd
> /mnt/hgfs/deltacloud/server
> but "ruby ./bin/deltacloudd" does work.
> See also http://fpaste.org/Qrxk/ and note:
>  $ /usr/bin/env ruby --version
> ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DTACLOUD-362) can't start DC with ./bin/deltacloudd, need to add "ruby"

Posted by "Michal Fojtik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13493993#comment-13493993 ] 

Michal Fojtik commented on DTACLOUD-362:
----------------------------------------

Hi Dies,

I spent some time trying reproduce this but no luck, this is what I did:

1. Installed CentOS 6
2. Installed ruby, ruby-devel, gcc, gcc-c++, libxslt-devel, libxslt.... (all other dependencies - bundler, etc...)
3. Cloned Deltacloud from git
4. $ cd deltacloud/server
5. $ bundle
6. $ ./bin/deltacloudd -i mock 

And I got:

[root@dhcp-lab-163 server]# ./bin/deltacloudd -i mock
Starting Deltacloud API :: mock :: http://localhost:3001/api

>> Thin web server (v1.5.0 codename Knife)
>> Debugging ON
>> Maximum connections set to 1024
>> Listening on localhost:3001, CTRL+C to stop

[root@dhcp-lab-163 server]# cat /etc/redhat-release 
CentOS release 6.3 (Final)

Can you check if the 'bin/deltacloudd' has correct permissions? (chmod +x bin/deltacloudd) otherwise I have no clue how this can happen. 
                
> can't start DC with ./bin/deltacloudd, need to add "ruby"
> ---------------------------------------------------------
>
>                 Key: DTACLOUD-362
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-362
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Website
>         Environment: CentOS 6.2 (and Win 7)
>            Reporter: Dies Koper
>            Priority: Minor
>
> I can't start DC with ./bin/deltacloudd:
> [root@localhost server]# ./bin/deltacloudd -i mock
> : No such file or directory
> [root@localhost server]# ls
> 0001-fgcp-activate-new-ip-as-soon-as-allocated.patch  deltacloud-core.gemspec  LICENSE  Rakefile   tests
> bin                                                   Gemfile                  log      README.md  tmp
> config                                                Gemfile.lock             NOTICE   support    views
> config.ru                                             lib                      public   temp.txt
> [root@localhost server]# pwd
> /mnt/hgfs/deltacloud/server
> but "ruby ./bin/deltacloudd" does work.
> See also http://fpaste.org/Qrxk/ and note:
>  $ /usr/bin/env ruby --version
> ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (DTACLOUD-362) can't start DC with ./bin/deltacloudd, need to add "ruby"

Posted by "Michal Fojtik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DTACLOUD-362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13495198#comment-13495198 ] 

Michal Fojtik commented on DTACLOUD-362:
----------------------------------------

ACK. Seems like using gitattributes is appropriate here.
                
> can't start DC with ./bin/deltacloudd, need to add "ruby"
> ---------------------------------------------------------
>
>                 Key: DTACLOUD-362
>                 URL: https://issues.apache.org/jira/browse/DTACLOUD-362
>             Project: DeltaCloud
>          Issue Type: Bug
>          Components: Website
>         Environment: CentOS 6.2 (and Win 7)
>            Reporter: Dies Koper
>            Priority: Minor
>         Attachments: 0001-added-.gitattributes-to-prevent-git-from-converting-.patch
>
>
> I can't start DC with ./bin/deltacloudd:
> [root@localhost server]# ./bin/deltacloudd -i mock
> : No such file or directory
> [root@localhost server]# ls
> 0001-fgcp-activate-new-ip-as-soon-as-allocated.patch  deltacloud-core.gemspec  LICENSE  Rakefile   tests
> bin                                                   Gemfile                  log      README.md  tmp
> config                                                Gemfile.lock             NOTICE   support    views
> config.ru                                             lib                      public   temp.txt
> [root@localhost server]# pwd
> /mnt/hgfs/deltacloud/server
> but "ruby ./bin/deltacloudd" does work.
> See also http://fpaste.org/Qrxk/ and note:
>  $ /usr/bin/env ruby --version
> ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira