You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by grkvlt <gi...@git.apache.org> on 2014/11/03 16:15:57 UTC

[GitHub] incubator-brooklyn pull request: Riak updates

GitHub user grkvlt opened a pull request:

    https://github.com/apache/incubator-brooklyn/pull/292

    Riak updates

    Updates to fix Riak operation with Clocker and Softlayer

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/grkvlt/incubator-brooklyn riak-url-update

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-brooklyn/pull/292.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #292
    
----
commit 54923080778277034eeaa0068bc4fbde71d88f60
Author: Martin Harris <gi...@nakomis.com>
Date:   2014-10-31T16:27:02Z

    temp commit - rebase me

commit 4b03cad8c1d8a12355382d670b52eaf9461aa2a2
Author: Andrew Kennedy <gr...@apache.org>
Date:   2014-11-03T15:00:03Z

    Fixes for subnetHostname in Riak for Clocker

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Riak updates

Posted by grkvlt <gi...@git.apache.org>.
Github user grkvlt commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/292#issuecomment-61516451
  
    This has been tested with Softlayer, Amazon EC2 and Clocker. Ready to merge.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Riak updates

Posted by nakomis <gi...@git.apache.org>.
Github user nakomis commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/292#issuecomment-61499969
  
    @aledsage definitely! This PR should really have been marked "DO NOT MERGE" as it's just really about getting my (WIP) work and Andrew's together for testing a pre-review. I think Andrew is going to be rebasing my commit out of this, so it will just be his commits, and I'll submit a PR for my (sensibly named) part once complete


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Riak updates

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-brooklyn/pull/292


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Riak updates

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on the pull request:

    https://github.com/apache/incubator-brooklyn/pull/292#issuecomment-61498308
  
    Can you rename the commit "temp commit - rebase me" please :-)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Riak updates

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/292#discussion_r19778743
  
    --- Diff: software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNodeSshDriver.java ---
    @@ -101,32 +108,36 @@ public void install() {
             }
             newScript(INSTALLING)
                     .body.append(commands)
    +                .failIfBodyEmpty()
    +                .failOnNonZeroResultCode()
                     .execute();
         }
     
         private List<String> installLinux(String expandedInstallDir) {
    -        LOG.info("Ignoring version config ({}) and installing from package manager", getEntity().getConfig(RiakNode.SUGGESTED_VERSION));
    -        OsDetails osDetails = getMachine().getMachineDetails().getOsDetails();
    -        String osVersion = osDetails.getVersion();
    -        String osMajorVersion = osVersion.contains(".") ? osVersion.substring(0, osVersion.indexOf(".")) : osVersion;
    -        String fullVersion = getEntity().getConfig(RiakNode.SUGGESTED_VERSION);
    -        String majorVersion = fullVersion.substring(0, 3);
    +        DynamicTasks.queueIfPossible(SshTasks.dontRequireTtyForSudo(getMachine(), SshTasks.OnFailingTask.WARN_OR_IF_DYNAMIC_FAIL_MARKING_INESSENTIAL)).orSubmitAndBlock();
    +
             String installBin = Urls.mergePaths(expandedInstallDir, "bin");
    +        String saveAsYum = "riak.rpm";
    +        String saveAsApt = "riak.deb";
    +        OsDetails osDetails = getMachine().getOsDetails();
             String apt = chainGroup(
                     //debian fix
                     "export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                     "which apt-get",
                     ok(sudo("apt-get -y --allow-unauthenticated install logrotate libpam0g-dev libssl0.9.8")),
    +                "export OS_NAME=" + Strings.toLowerCase(osDetails.getName()),
                     // TODO: Debian support (default debian image fails with 'sudo: command not found')
    -                "[[ \"lucid natty precise\" =~ (^| )`lsb_release -sc`($| )  ]] && export OS_RELEASE=`lsb_release -sc` || export OS_RELEASE=precise",
    -                String.format("wget http://s3.amazonaws.com/downloads.basho.com/riak/%s/%s/ubuntu/$OS_RELEASE/riak_%<s-1_amd64.deb", majorVersion, fullVersion),
    -                sudo(String.format("dpkg -i riak_%s-1_amd64.deb", fullVersion)),
    -                sudo("apt-get -y --allow-unauthenticated -f install"));
    +                "debian".equals(osDetails.getName()) ?
    +                    "export OS_RELEASE=" + osDetails.getVersion().substring(0, osDetails.getVersion().indexOf(".")) :
    +                    "export OS_RELEASE=`lsb_release -sc` && " +
    +                    "export OS_RELEASE=`([[ \"lucid natty precise\" =~ (^| )\\$OS_RELEASE($| ) ]] && echo $OS_RELEASE || echo precise)`",
    +                String.format("wget -O %s %s", saveAsApt, entity.getAttribute(RiakNode.DOWNLOAD_URL_UBUNTU_DEBIAN)),
    --- End diff --
    
    See https://github.com/apache/incubator-brooklyn/pull/293


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-brooklyn pull request: Riak updates

Posted by aledsage <gi...@git.apache.org>.
Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/292#discussion_r19778652
  
    --- Diff: software/nosql/src/main/java/brooklyn/entity/nosql/riak/RiakNodeSshDriver.java ---
    @@ -101,32 +108,36 @@ public void install() {
             }
             newScript(INSTALLING)
                     .body.append(commands)
    +                .failIfBodyEmpty()
    +                .failOnNonZeroResultCode()
                     .execute();
         }
     
         private List<String> installLinux(String expandedInstallDir) {
    -        LOG.info("Ignoring version config ({}) and installing from package manager", getEntity().getConfig(RiakNode.SUGGESTED_VERSION));
    -        OsDetails osDetails = getMachine().getMachineDetails().getOsDetails();
    -        String osVersion = osDetails.getVersion();
    -        String osMajorVersion = osVersion.contains(".") ? osVersion.substring(0, osVersion.indexOf(".")) : osVersion;
    -        String fullVersion = getEntity().getConfig(RiakNode.SUGGESTED_VERSION);
    -        String majorVersion = fullVersion.substring(0, 3);
    +        DynamicTasks.queueIfPossible(SshTasks.dontRequireTtyForSudo(getMachine(), SshTasks.OnFailingTask.WARN_OR_IF_DYNAMIC_FAIL_MARKING_INESSENTIAL)).orSubmitAndBlock();
    +
             String installBin = Urls.mergePaths(expandedInstallDir, "bin");
    +        String saveAsYum = "riak.rpm";
    +        String saveAsApt = "riak.deb";
    +        OsDetails osDetails = getMachine().getOsDetails();
             String apt = chainGroup(
                     //debian fix
                     "export PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                     "which apt-get",
                     ok(sudo("apt-get -y --allow-unauthenticated install logrotate libpam0g-dev libssl0.9.8")),
    +                "export OS_NAME=" + Strings.toLowerCase(osDetails.getName()),
                     // TODO: Debian support (default debian image fails with 'sudo: command not found')
    -                "[[ \"lucid natty precise\" =~ (^| )`lsb_release -sc`($| )  ]] && export OS_RELEASE=`lsb_release -sc` || export OS_RELEASE=precise",
    -                String.format("wget http://s3.amazonaws.com/downloads.basho.com/riak/%s/%s/ubuntu/$OS_RELEASE/riak_%<s-1_amd64.deb", majorVersion, fullVersion),
    -                sudo(String.format("dpkg -i riak_%s-1_amd64.deb", fullVersion)),
    -                sudo("apt-get -y --allow-unauthenticated -f install"));
    +                "debian".equals(osDetails.getName()) ?
    +                    "export OS_RELEASE=" + osDetails.getVersion().substring(0, osDetails.getVersion().indexOf(".")) :
    +                    "export OS_RELEASE=`lsb_release -sc` && " +
    +                    "export OS_RELEASE=`([[ \"lucid natty precise\" =~ (^| )\\$OS_RELEASE($| ) ]] && echo $OS_RELEASE || echo precise)`",
    +                String.format("wget -O %s %s", saveAsApt, entity.getAttribute(RiakNode.DOWNLOAD_URL_UBUNTU_DEBIAN)),
    --- End diff --
    
    This breaks the jenkins integration test on Ubuntu.
    The `osDetails.getName()` is returning linux, rather than Debian or Ubuntu.
    I'm fixing that bit, bit I'm also getting a failure in launch.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---