Esempio n. 1
0
    def testCloud(self):
        baseport = 54300
        ports_per_node = 2

        print "\nTest was written because seeing a bigger cloud than we want sometimes"
        print "You'll see the problem in the cloud in the browser"
        print "\nWorks if real ip address used. fails with 127.0.0.1 (intermittent)"
        print "Builds cloud with 3, the extra being a non-127.0.0.1 node (the real ip)"
        print "Eventually it goes away, around 1 minute?"
        for trial in range(20):
            for tryNodes in range(2,3):
                sys.stdout.write('.')
                sys.stdout.flush()

                start = time.time()
                ### this works
                ### h2o.build_cloud(use_this_ip_addr="192.168.0.37",
                # this intermittently fails
                h2o.build_cloud(use_this_ip_addr="127.0.0.1", 
                    node_count=tryNodes, base_port=base_port, java_heap_GB=1,
                    timeoutSecs=15, retryDelaySecs=2)
                print "trial #%d: Build cloud of %d in %d secs" % (trial, tryNodes, (time.time() - start)) 

                h2o.verify_cloud_size()
                h2o.tear_down_cloud()

                # increment the base_port to avoid sticky ports when we do another
                # we only use two ports now?
                baseport += ports_per_node * tryNodes
Esempio n. 2
0
 def setUpClass(cls):
     start = time.time()
     h2o_hosts.build_cloud_with_hosts(node_count, base_port=base_port, 
         use_flatfile=True, java_heap_GB=1)
     print "Cloud of", len(h2o.nodes), "built in", time.time()-start, "seconds"
     h2o.verify_cloud_size()
     h2o.check_sandbox_for_errors()
Esempio n. 3
0
 def setUpClass(cls):
     start = time.time()
     h2o_hosts.build_cloud_with_hosts(node_count, base_port=base_port, 
         use_flatfile=True, java_heap_GB=1)
     print "Cloud of", len(h2o.nodes), "built in", time.time()-start, "seconds"
     h2o.verify_cloud_size()
     h2o.check_sandbox_for_errors()
Esempio n. 4
0
    def testCloud(self):
        base_port = 54300
        ports_per_node = 2

        print "\nTest was written because seeing a bigger cloud than we want sometimes"
        print "You'll see the problem in the cloud in the browser"
        print "\nWorks if real ip address used. fails with 127.0.0.1 (intermittent)"
        print "Builds cloud with 3, the extra being a non-127.0.0.1 node (the real ip)"
        print "Eventually it goes away, around 1 minute?"
        for trial in range(20):
            for tryNodes in range(2, 3):
                sys.stdout.write('.')
                sys.stdout.flush()

                start = time.time()
                ### this works
                ### h2o.build_cloud(use_this_ip_addr="192.168.0.37",
                # this intermittently fails
                h2o.build_cloud(use_this_ip_addr="127.0.0.1",
                                node_count=tryNodes,
                                base_port=base_port,
                                java_heap_GB=1,
                                timeoutSecs=15,
                                retryDelaySecs=2)
                print "trial #%d: Build cloud of %d in %d secs" % (
                    trial, tryNodes, (time.time() - start))

                h2o.verify_cloud_size()
                h2o.tear_down_cloud()
Esempio n. 5
0
    def test_Cloud(self):
        # FIX! weird timeout H2O exceptions with >8? maybe shouldn't
        # don't know if we care
        base_port = 54321 + random.randint(0, 256)
        ports_per_node = 2
        tryNodes = 5
        for trial in range(10):
            h2o.verboseprint("Trying cloud of", tryNodes)
            sys.stdout.write('.')
            sys.stdout.flush()

            start = time.time()
            h2o_hosts.build_cloud_with_hosts(tryNodes,
                                             base_port=base_port,
                                             retryDelaySecs=2,
                                             timeoutSecs=max(
                                                 30, 10 * tryNodes),
                                             java_heap_GB=1)
            print "trial #%d: Build cloud of %d in %d secs" % (trial, tryNodes,
                                                               (time.time() -
                                                                start))

            h2o.verify_cloud_size()
            time.sleep(5)
            h2o.tear_down_cloud()
Esempio n. 6
0
 def setUpClass(cls):
     # do the first one to build up hosts
     # so we don't repeatedly copy the jar
     # have to make sure base_port is the same on both!
     h2o.write_flatfile(node_count=node_count, base_port=base_port)
     h2o_hosts.build_cloud_with_hosts(node_count, base_port=base_port, use_flatfile=True)
     h2o.verify_cloud_size()
     h2o.check_sandbox_for_errors()
Esempio n. 7
0
 def setUpClass(cls):
     print "setUpClass"
     # standard method for being able to reproduce the random.* seed
     h2o.setup_random_seed()
     h2o.build_cloud_with_json()
     # if you're fast with a test and cloud building, you may need to wait for cloud to stabilize
     # normally this is baked into build_cloud, but let's leave it here for now
     h2o.stabilize_cloud(h2o.nodes[0], node_count=len(h2o.nodes), timeoutSecs=90)
     # this ?should? work although not guaranteed all will agree on the cloud size
     # unless we do the conservative stabilize above
     h2o.verify_cloud_size()
Esempio n. 8
0
def check_cloud_and_setup_next():
    h2b.browseTheCloud()
    h2o.verify_cloud_size()
    h2o.check_sandbox_for_errors()
    print "Tearing down cloud of size", len(h2o.nodes)
    h2o.tear_down_cloud()
    h2o.clean_sandbox()
    # wait to make sure no sticky ports or anything os-related
    # so let's expand the delay if larger number of jvms
    # 1 second per node seems good
    h2o.verboseprint("Waiting", node_count, "seconds to avoid OS sticky port problem")
    time.sleep(node_count)
Esempio n. 9
0
    def test_script_download(self):
        print "Assuming all json requests are logged in the script? maybe not"
        h2o.verify_cloud_size()

        (logNameList, lineCountList) = h2o_log.getH2OScripts()

        self.assertEqual(len(logNameList), len(h2o.nodes), "Should be %d scripts" % len(h2o.nodes))
        self.assertEqual(len(lineCountList), len(h2o.nodes), "Should be %d scripts" % len(h2o.nodes))
        # line counts seem to vary..check for "too small"
        # variance in polling (cloud building and status)?
        for i, l in enumerate(lineCountList):
            self.assertGreater(l, 12, "node %d script is too small" % i)
Esempio n. 10
0
    def setUpClass(cls):
        # do the first one to build up hosts
        # so we don't repeatedly copy the jar
        # have to make sure base_port is the same on both!
        # just do once and don't clean sandbox
        h2o.write_flatfile(node_count=node_count, base_port=base_port)
        start = time.time()
        h2o_hosts.build_cloud_with_hosts(node_count, base_port=base_port, 
            use_flatfile=True, java_heap_GB=1)
        print "Cloud of", len(h2o.nodes), "built in", time.time()-start, "seconds"

        h2o.verify_cloud_size()
        h2o.check_sandbox_for_errors()
Esempio n. 11
0
    def testCloud(self):
        ports_per_node = 2
        for tryNodes in range(2,8):
            sys.stdout.write('.')
            sys.stdout.flush()

            start = time.time()
            h2o.init(use_this_ip_addr="127.0.0.1", node_count=tryNodes, timeoutSecs=30, retryDelaySecs=2, java_heap_GB=1)
            print "Build cloud of %d in %d secs" % (tryNodes, (time.time() - start)) 

            h2o.verboseprint(h2o.nodes)
            h2o.verify_cloud_size()
            h2o.tear_down_cloud(h2o.nodes)
Esempio n. 12
0
 def setUpClass(cls):
     print "setUpClass"
     # standard method for being able to reproduce the random.* seed
     h2o.setup_random_seed()
     h2o.build_cloud_with_json()
     # if you're fast with a test and cloud building, you may need to wait for cloud to stabilize
     # normally this is baked into build_cloud, but let's leave it here for now
     h2o.stabilize_cloud(h2o.nodes[0],
                         node_count=len(h2o.nodes),
                         timeoutSecs=90)
     # this ?should? work although not guaranteed all will agree on the cloud size
     # unless we do the conservative stabilize above
     h2o.verify_cloud_size()
Esempio n. 13
0
    def test_script_download(self):
        print "Assuming all json requests are logged in the script? maybe not"
        h2o.verify_cloud_size()

        (logNameList, lineCountList) = h2o_log.getH2OScripts()

        self.assertEqual(len(logNameList), len(h2o.nodes),
                         "Should be %d scripts" % len(h2o.nodes))
        self.assertEqual(len(lineCountList), len(h2o.nodes),
                         "Should be %d scripts" % len(h2o.nodes))
        # line counts seem to vary..check for "too small"
        # variance in polling (cloud building and status)?
        for i, l in enumerate(lineCountList):
            self.assertGreater(l, 12, "node %d script is too small" % i)
Esempio n. 14
0
    def test_build_for_clone(self):
        # python gets confused about which 'start' if I used start here
        elapsed = time.time() - beginning
        print "\n%0.2f seconds to get here from start" % elapsed

        # might as well open a browser on it? (because the ip/port will vary
        # maybe just print the ip/port for now
        ## h2b.browseTheCloud()

        maxTime = 4*3600
        totalTime = 0
        incrTime = 60
        h2p.purple_print("\nSleeping for total of", (maxTime+0.0)/3600, "hours.")
        print "Will check h2o logs every", incrTime, "seconds"
        print "Should be able to run another test using h2o-nodes.json to clone cloud"
        print "i.e. h2o.build_cloud_with_json()"
        print "Bad test if a running test shuts down the cloud. I'm supposed to!\n"

        h2p.green_print("To watch cloud in browser follow address:")
        h2p.green_print("   http://{0}:{1}/Cloud.html".format(h2o.nodes[0].http_addr, h2o.nodes[0].port))
        h2p.blue_print("You can start a test (or tests) now!") 

        h2p.blue_print("Will Check cloud status every %s secs and kill cloud if wrong or no answer" % incrTime)
        if CHECK_WHILE_SLEEPING:        
            h2p.blue_print("Will also look at redirected stdout/stderr logs in sandbox every %s secs" % incrTime)

        h2p.red_print("No checking of logs while sleeping, or check of cloud status")
        h2p.yellow_print("So if H2O stack traces, it's up to you to kill me if 4 hours is too long")
        h2p.yellow_print("ctrl-c will cause all jvms to die(thru psutil terminate, paramiko channel death or h2o shutdown...")


        while (totalTime<maxTime): # die after 4 hours
            h2o.sleep(incrTime)
            totalTime += incrTime
            # good to touch all the nodes to see if they're still responsive
            # give them up to 120 secs to respond (each individually)
            h2o.verify_cloud_size(timeoutSecs=120)
            if CHECK_WHILE_SLEEPING:        
                print "Checking sandbox log files"
                h2o.check_sandbox_for_errors(cloudShutdownIsError=True)
            else:
                print str(datetime.datetime.now()), h2o.python_cmd_line, "still here", totalTime, maxTime, incrTime

        # don't do this, as the cloud may be hung?
        if 1==0:
            print "Shutting down cloud, but first delete all keys"
            start = time.time()
            h2i.delete_keys_at_all_nodes()
            elapsed = time.time() - start
            print "delete_keys_at_all_nodes(): took", elapsed, "secs"
Esempio n. 15
0
    def test_Cloud(self):
        # FIX! weird timeout H2O exceptions with >8? maybe shouldn't
        # don't know if we care
        ports_per_node = 2
        for tryNodes in range(2,17):
            h2o.verboseprint("Trying cloud of", tryNodes)
            sys.stdout.write('.')
            sys.stdout.flush()

            start = time.time()
            h2o.build_cloud(tryNodes, retryDelaySecs=2, timeoutSecs=max(30,10*tryNodes), java_heap_GB=1)
            print "Built cloud of %d in %d s" % (tryNodes, (time.time() - start)) 
            h2o.verify_cloud_size()
            h2o.tear_down_cloud()
Esempio n. 16
0
    def test_Cloud(self):
        base_port = 54300
        ports_per_node = 2
        for trials in range(0, 5):
            for tryNodes in range(3, 6):
                sys.stdout.write('.')
                sys.stdout.flush()

                start = time.time()
                # start by cleaning sandbox (in build_cloud).
                # so nosetest works which doesn't do unit_main

                # done in build_cloud now
                ### h2o.write_flatfile(node_count=tryNodes, base_port=base_port)
                h2o.build_cloud(node_count=tryNodes,
                                java_heap_GB=1,
                                timeoutSecs=30,
                                retryDelaySecs=2,
                                base_port=base_port,
                                use_flatfile=True)
                print "loop %d: Build cloud of %d in %d s" % (trials, tryNodes,
                                                              (time.time() -
                                                               start))

                for i in range(2):
                    print "nodes report size: %s consensus: %s expected: %d." % h2o.verify_cloud_size(
                    )

                h2o.tear_down_cloud()
                # with so many jvms, wait for sticky ports to be freed up..slow os stuff?
                # changed, to increment the base_port, to avoid reuse immediately
                time.sleep(1)
                base_port += ports_per_node * tryNodes
Esempio n. 17
0
    def test_Cloud(self):
        base_port = 54300
        ports_per_node = 2
        for trials in range(0,5):
            for tryNodes in range(3,6):
                sys.stdout.write('.')
                sys.stdout.flush()

                start = time.time()
                # start by cleaning sandbox (in build_cloud). 
                # so nosetest works which doesn't do unit_main

                # done in build_cloud now
                ### h2o.write_flatfile(node_count=tryNodes, base_port=base_port)
                h2o.build_cloud(node_count=tryNodes, java_heap_GB=1,
                    timeoutSecs=30, retryDelaySecs=2, base_port=base_port, use_flatfile=True)
                print "loop %d: Build cloud of %d in %d s" % (trials, tryNodes, (time.time() - start)) 

                for i in range(2):
                    print "nodes report size: %s consensus: %s expected: %d." % h2o.verify_cloud_size()

                h2o.tear_down_cloud()
                # with so many jvms, wait for sticky ports to be freed up..slow os stuff?
                # changed, to increment the base_port, to avoid reuse immediately
                time.sleep(1)
                base_port += ports_per_node * tryNodes
Esempio n. 18
0
    def test_Cloud(self):
        # FIX! weird timeout H2O exceptions with >8? maybe shouldn't
        # don't know if we care
        base_port = 54300
        ports_per_node = 2
        for tryNodes in range(2,17):
            h2o.verboseprint("Trying cloud of", tryNodes)
            sys.stdout.write('.')
            sys.stdout.flush()

            start = time.time()
            h2o.build_cloud(tryNodes, base_port=base_port, 
                retryDelaySecs=2, timeoutSecs=max(30,10*tryNodes), java_heap_GB=1)
            print "Built cloud of %d in %d s" % (tryNodes, (time.time() - start)) 
            h2o.verify_cloud_size()
            h2o.tear_down_cloud()
Esempio n. 19
0
 def setUpClass(cls):
     print "setUpClass"
     # standard method for being able to reproduce the random.* seed
     h2o.setup_random_seed()
     # do a hack so we can run release tests with a -cj arg. so we don't have to build the cloud separately
     # those tests will always want to run non-local (big machien) so detecting -cj is fine
     if h2o.config_json:
         h2o_hosts.build_cloud_with_hosts()
     else:
         # this is the normal thing for release tests (separate cloud was built. clone it)
         h2o.build_cloud_with_json()
     # if you're fast with a test and cloud building, you may need to wait for cloud to stabilize
     # normally this is baked into build_cloud, but let's leave it here for now
     h2o.stabilize_cloud(h2o.nodes[0], h2o.nodes, timeoutSecs=90)
     # this ?should? work although not guaranteed all will agree on the cloud size
     # unless we do the conservative stabilize above
     h2o.verify_cloud_size()
Esempio n. 20
0
 def setUpClass(cls):
     print "setUpClass"
     # standard method for being able to reproduce the random.* seed
     h2o.setup_random_seed()
     # do a hack so we can run release tests with a -cj arg. so we don't have to build the cloud separately
     # those tests will always want to run non-local (big machien) so detecting -cj is fine
     if h2o.config_json:
         h2o_hosts.build_cloud_with_hosts()
     else:
         # this is the normal thing for release tests (separate cloud was built. clone it)
         h2o.build_cloud_with_json()
     # if you're fast with a test and cloud building, you may need to wait for cloud to stabilize
     # normally this is baked into build_cloud, but let's leave it here for now
     h2o.stabilize_cloud(h2o.nodes[0], node_count=len(h2o.nodes), timeoutSecs=90)
     # this ?should? work although not guaranteed all will agree on the cloud size
     # unless we do the conservative stabilize above
     h2o.verify_cloud_size()
Esempio n. 21
0
    def test_Cloud(self):
        # FIX! weird timeout H2O exceptions with >8? maybe shouldn't
        # don't know if we care
        base_port = 54500
        ports_per_node = 2
        tryNodes = 5
        for trial in range(10):
            h2o.verboseprint("Trying cloud of", tryNodes)
            sys.stdout.write('.')
            sys.stdout.flush()

            start = time.time()
            h2o_hosts.build_cloud_with_hosts(tryNodes, base_port=base_port, 
                retryDelaySecs=2, timeoutSecs=max(30,10*tryNodes), java_heap_GB=1)
            print "trial #%d: Build cloud of %d in %d secs" % (trial, tryNodes, (time.time() - start))

            h2o.verify_cloud_size()
            h2o.tear_down_cloud()
Esempio n. 22
0
    def testCloud(self):
        baseport = 54300
        ports_per_node = 3
        for tryNodes in range(2,8):
            sys.stdout.write('.')
            sys.stdout.flush()

            start = time.time()
            h2o.build_cloud(use_this_ip_addr="127.0.0.1", base_port=baseport, node_count=tryNodes, timeoutSecs=30)
            print "Build cloud of %d in %d secs" % (tryNodes, (time.time() - start)) 

            h2o.verboseprint(h2o.nodes)
            h2o.verify_cloud_size()
            h2o.tear_down_cloud(h2o.nodes)

            # increment the base_port to avoid sticky ports when we do another
            # we only use two ports now?
            baseport += ports_per_node * tryNodes
Esempio n. 23
0
def check_cloud_and_setup_next():
    h2b.browseTheCloud()
    h2o.verify_cloud_size()
    h2o.check_sandbox_for_errors()
    print "Tearing down cloud of size", len(h2o.nodes)
    h2o.tear_down_cloud()
    h2o.clean_sandbox()
    # wait to make sure no sticky ports or anything os-related
    # so let's expand the delay if larger number of jvms
    # 1 second per node seems good
    h2o.verboseprint("Waiting", node_count, "seconds to avoid OS sticky port problem")
    time.sleep(node_count)
    # stick port issues (os)
    # wait a little for jvms to really clear out?
    # and increment the base_port
    global base_port
    # if we change the port we have to upload the flatfile again
    # maybe just use_flatfile=false
    base_port += portsPerNode * node_count
Esempio n. 24
0
    def test_Cloud(self):
        # FIX! weird timeout H2O exceptions with >8? maybe shouldn't
        # don't know if we care
        base_port = 54300
        ports_per_node = 3
        for tryNodes in range(2,10):
            h2o.verboseprint("Trying cloud of", tryNodes)
            sys.stdout.write('.')
            sys.stdout.flush()

            start = time.time()
            h2o.build_cloud(tryNodes, base_port=base_port)
            print "Built cloud of %d in %d s" % (tryNodes, (time.time() - start)) 
            for i in range(2):
                h2o.verify_cloud_size()
                time.sleep(1)

            h2o.tear_down_cloud()
            base_port += ports_per_node * tryNodes
Esempio n. 25
0
    def test_build_for_clone(self):
        # python gets confused about which 'start' if I used start here
        elapsed = time.time() - beginning
        print "\n%0.2f seconds to get here from start" % elapsed

        # might as well open a browser on it? (because the ip/port will vary
        # maybe just print the ip/port for now
        ## h2b.browseTheCloud()

        maxTime = 4 * 3600
        totalTime = 0
        incrTime = 60
        h2p.purple_print("\nSleeping for total of", (maxTime + 0.0) / 3600,
                         "hours.")
        print "Will check h2o logs every", incrTime, "seconds"
        print "Should be able to run another test using h2o-nodes.json to clone cloud"
        print "i.e. h2o.build_cloud_with_json()"
        print "Bad test if a running test shuts down the cloud. I'm supposed to!\n"

        h2p.green_print("To watch cloud in browser follow address:")
        h2p.green_print("   http://{0}:{1}/Cloud.html".format(
            h2o.nodes[0].http_addr, h2o.nodes[0].port))
        h2p.blue_print("You can start a test (or tests) now!")
        h2p.blue_print(
            "Will spin looking at redirected stdout/stderr logs in sandbox for h2o errors every %s secs"
            % incrTime)
        h2p.red_print("This is just for fun")
        h2p.yellow_print("So is this")

        while (totalTime < maxTime):  # die after 4 hours
            h2o.sleep(incrTime)
            totalTime += incrTime
            # good to touch all the nodes to see if they're still responsive
            # give them up to 120 secs to respond (each individually)
            h2o.verify_cloud_size(timeoutSecs=120)
            print "Checking sandbox log files"
            h2o.check_sandbox_for_errors(cloudShutdownIsError=True)

        start = time.time()
        h2i.delete_keys_at_all_nodes()
        elapsed = time.time() - start
        print "delete_keys_at_all_nodes(): took", elapsed, "secs"
Esempio n. 26
0
    def testCloud(self):
        ports_per_node = 2

        print "\nTest was written because seeing a bigger cloud than we want sometimes"
        print "You'll see the problem in the cloud in the browser"
        print "\nWorks if real ip address used. fails with 127.0.0.1 (intermittent)"
        print "Builds cloud with 3, the extra being a non-127.0.0.1 node (the real ip)"
        print "Eventually it goes away, around 1 minute?"
        for trial in range(20):
            for tryNodes in range(2,3):
                sys.stdout.write('.')
                sys.stdout.flush()

                start = time.time()
                # this intermittently fails
                h2o.init(use_this_ip_addr="127.0.0.1", node_count=tryNodes, java_heap_GB=1, timeoutSecs=15, retryDelaySecs=2)
                print "trial #%d: Build cloud of %d in %d secs" % (trial, tryNodes, (time.time() - start)) 

                h2o.verify_cloud_size()
                h2o.tear_down_cloud()
Esempio n. 27
0
    def test_remote_Cloud(self):
        trySize = 0
        # FIX! we should increment this from 1 to N? 
        for i in range(1,10):
            # timeout wants to be larger for large numbers of hosts * node_count
            # don't want to reload jar/flatfile, so use build_cloud
            timeoutSecs = max(60, 2*(len(h2o_hosts.hosts) * node_count))
            h2o.build_cloud(node_count, hosts=h2o_hosts.hosts, use_flatfile=True, 
                timeoutSecs=timeoutSecs, retryDelaySecs=0.5)
            h2o.verify_cloud_size()
            h2o.check_sandbox_for_errors()

            print "Tearing down cloud of size", len(h2o.nodes)
            h2o.tear_down_cloud()
            h2o.clean_sandbox()
            # wait to make sure no sticky ports or anything os-related
            # so let's expand the delay if larger number of jvms
            # 1 second per node seems good
            h2o.verboseprint("Waiting", node_count, "seconds to avoid OS sticky port problem")
            sys.stdout.write('.')
            sys.stdout.flush()
            time.sleep(node_count)
Esempio n. 28
0
File: cloud.py Progetto: 100star/h2o
    def test_build_for_clone(self):
        # python gets confused about which 'start' if I used start here
        elapsed = time.time() - beginning
        print "\n%0.2f seconds to get here from start" % elapsed

        # might as well open a browser on it? (because the ip/port will vary
        # maybe just print the ip/port for now
        ## h2b.browseTheCloud()

        maxTime = 4*3600
        totalTime = 0
        incrTime = 60
        h2p.purple_print("\nSleeping for total of", (maxTime+0.0)/3600, "hours.")
        print "Will check h2o logs every", incrTime, "seconds"
        print "Should be able to run another test using h2o-nodes.json to clone cloud"
        print "i.e. h2o.build_cloud_with_json()"
        print "Bad test if a running test shuts down the cloud. I'm supposed to!\n"

        h2p.green_print("To watch cloud in browser follow address:")
        h2p.green_print("   http://{0}:{1}/Cloud.html".format(h2o.nodes[0].http_addr, h2o.nodes[0].port))
        h2p.blue_print("You can start a test (or tests) now!") 
        h2p.blue_print("Will spin looking at redirected stdout/stderr logs in sandbox for h2o errors every %s secs" % incrTime)
        h2p.red_print("This is just for fun")
        h2p.yellow_print("So is this")

        while (totalTime<maxTime): # die after 4 hours
            h2o.sleep(incrTime)
            totalTime += incrTime
            # good to touch all the nodes to see if they're still responsive
            # give them up to 120 secs to respond (each individually)
            h2o.verify_cloud_size(timeoutSecs=120)
            print "Checking sandbox log files"
            h2o.check_sandbox_for_errors(cloudShutdownIsError=True)

        start = time.time()
        h2i.delete_keys_at_all_nodes()
        elapsed = time.time() - start
        print "delete_keys_at_all_nodes(): took", elapsed, "secs"
    def test_dead_node_status(self):
        # view logs using each node
        h2b.browseTheCloud()

        for h in h2o.nodes:
            h.log_view()

        # terminate node 1
        h2o.nodes[1].terminate_self_only()
        nodeList = h2o.nodes[:] # copy
        del nodeList[1] # 1 is dead now
        print "We probably need some status to interrogate to understand a node is in red state?"
        print "And I probably need to wait 60 secs to get to red state"
        time.sleep(5)
        h2o.verify_cloud_size(nodeList, verbose=True)
        time.sleep(5)
        h2o.verify_cloud_size(nodeList, verbose=True)
        time.sleep(5)
        h2o.verify_cloud_size(nodeList, verbose=True)
Esempio n. 30
0
    def test_dead_node_status(self):
        # view logs using each node
        h2b.browseTheCloud()

        for h in h2o.nodes:
            h.log_view()

        # terminate node 1
        h2o.nodes[1].terminate_self_only()
        nodeList = h2o.nodes[:]  # copy
        del nodeList[1]  # 1 is dead now
        print "We probably need some status to interrogate to understand a node is in red state?"
        print "And I probably need to wait 60 secs to get to red state"
        time.sleep(5)
        h2o.verify_cloud_size(nodeList, verbose=True)
        time.sleep(5)
        h2o.verify_cloud_size(nodeList, verbose=True)
        time.sleep(5)
        h2o.verify_cloud_size(nodeList, verbose=True)
Esempio n. 31
0
 def test_A_Basic(self):
     h2o.verify_cloud_size()
Esempio n. 32
0
 def test_clone_basic(self):
     h2o.verify_cloud_size()
Esempio n. 33
0
 def test_C_build_cloud_relaxed_1(self):
     for trials in range(1):
         h2o.build_cloud(1, java_heap_GB=1, conservative=False)
         h2o.verify_cloud_size()
         h2o.tear_down_cloud()
         time.sleep(5)
Esempio n. 34
0
 def test_C_build_cloud_relaxed_1(self):
     for trials in range(1):
         h2o.build_cloud(1,java_heap_GB=1, conservative=False)
         h2o.verify_cloud_size()
         h2o.tear_down_cloud()
         time.sleep(5)
Esempio n. 35
0
 def test_A_Basic(self):
     h2o.verify_cloud_size()
Esempio n. 36
0
 def test_clone_basic(self):
     h2o.verify_cloud_size()