Package lcmc.cluster.service.ssh

Examples of lcmc.cluster.service.ssh.SshOutput


    public final void updateInfo(final JEditorPane ep) {
        final Runnable runnable = new Runnable() {
            @Override
            public void run() {
                final Host host = getBrowser().getHost();
                final SshOutput ret = host.captureCommand(new ExecCommandConfig()
                                                              .command("/sbin/ip a l " + getName()));
                ep.setText(ret.getOutput());
            }
        };
        final Thread thread = new Thread(runnable);
        thread.start();
    }
View Full Code Here


        final Runnable runnable = new Runnable() {
            @Override
            public void run() {
                if (cachedModinfoOutput == null) {
                    final Host host = getBrowser().getHost();
                    final SshOutput ret = host.captureCommand(new ExecCommandConfig()
                                                                  .command("/sbin/modinfo " + getName()));
                    cachedModinfoOutput = ret.getOutput();
                }
                ep.setText("<html><pre>" + cachedModinfoOutput + "</html></pre>");
            }
        };
        final Thread thread = new Thread(runnable);
View Full Code Here

        getProgressBar().start(2000);
        findAvailTarballs();
    }

    protected void findAvailTarballs() {
        final SshOutput ret = getHost().captureCommand(new ExecCommandConfig()
                                    .commandString("DrbdAvailVersionsSource")
                                    .convertCmdCallback(getDrbdInstallationConvertCmdCallback()).silentOutput());
        final int exitCode = ret.getExitCode();
        final String output = ret.getOutput();
        if (exitCode == 0) {
            if (output == null || output.isEmpty()) {
                progressBarDoneError();
                printErrorAndRetry(Tools.getString("Dialog.Host.DrbdAvailSourceFiles.NoBuilds"), output, exitCode);
                return;
View Full Code Here

            });
        }
    }

    private String getLastDrbdUtilFileName() {
        final SshOutput ret = getHost().captureCommand(new ExecCommandConfig()
                .commandString("DrbdUtilAvailVersionsSource")
                .convertCmdCallback(getDrbdInstallationConvertCmdCallback()).silentOutput());
        final int exitCode = ret.getExitCode();
        final String output = ret.getOutput();
        if (exitCode == 0) {
            if (output == null || output.isEmpty()) {
                progressBarDoneError();
                printErrorAndRetry(Tools.getString("Dialog.Host.DrbdAvailSourceFiles.NoBuilds"), output, exitCode);
                return null;
View Full Code Here

            }
            h++;
        }
        command.append(" 2>&1");
        int i = 0;
        SshOutput out;
        do {
            out = getSSH().execCommandAndWait(new ExecCommandConfig().command(command.toString())
                                                                     .sshCommandTimeout(60000));
            if (out.getExitCode() == 0 || out.getExitCode() == 10) {
                break;
            }
            i++;
            roboTest.sleepNoFactor(i * 2000);
        } while (i < 5);
        String nameS = ' ' + name;
        if (name == null) {
            nameS = "";
        }
        if (i > 0) {
            roboTest.info(getName() + ' ' + test + ' ' + index + nameS + " tries: " + (i + 1));
        }
        roboTest.info(getName() + ' ' + test + ' ' + index + nameS + ' ' + out.getOutput());
        return out.getExitCode() == 0;
    }
View Full Code Here

            }
            String cmd = command.replaceAll("@DRYRUN@", "-d");
            if (cmd.contains("@DRYRUNCONF@")) {
                cmd = cmd.replaceAll("@DRYRUNCONF@", "-c /var/lib/drbd/drbd.conf-lcmc-test");
            }
            final SshOutput output = host.captureCommand(new ExecCommandConfig().command(cmd)
                                                                                .silentCommand()
                                                                                .silentOutput());
            M_DRBD_TEST_WRITELOCK.lock();
            try {
                if (drbdtestOutput == null) {
                    drbdtestOutput = output.getOutput();
                } else {
                    drbdtestOutput += output.getOutput();
                }
            } finally {
                M_DRBD_TEST_WRITELOCK.unlock();
            }
            return output;
View Full Code Here

                                 final String resource,
                                 final String volume,
                                 final ExecCallback execCallback,
                                 final Application.RunMode runMode) {
        final String command = host.getDistCommand("DRBD.attach", getResVolReplaceHash(host, resource, volume));
        final SshOutput ret = execCommand(host, command, execCallback, true, runMode);
        return ret.getExitCode() == 0;
    }
View Full Code Here

                                 final String resource,
                                 final String volume,
                                 final ExecCallback execCallback,
                                 final Application.RunMode runMode) {
        final String command = host.getDistCommand("DRBD.detach", getResVolReplaceHash(host, resource, volume));
        final SshOutput ret = execCommand(host, command, execCallback, true, runMode);
        return ret.getExitCode() == 0;
    }
View Full Code Here

                                  final String resource,
                                  final String volume,
                                  final ExecCallback execCallback,
                                  final Application.RunMode runMode) {
        final String command = host.getDistCommand("DRBD.connect", getResVolReplaceHash(host, resource, volume));
        final SshOutput ret = execCommand(host, command, execCallback, true, runMode);
        return ret.getExitCode() == 0;
    }
View Full Code Here

                                     final String resource,
                                     final String volume,
                                     final ExecCallback execCallback,
                                     final Application.RunMode runMode) {
        final String command = host.getDistCommand("DRBD.disconnect", getResVolReplaceHash(host, resource, volume));
        final SshOutput ret = execCommand(host, command, execCallback, true, runMode);
        return ret.getExitCode() == 0;
    }
View Full Code Here

TOP

Related Classes of lcmc.cluster.service.ssh.SshOutput

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.