[
https://issues.jboss.org/browse/JBIDE-23039?page=com.atlassian.jira.plugi...
]
Martin Malina commented on JBIDE-23039:
---------------------------------------
[~rob.stryker], I tried the PR on Mac. I started CDK 2.2 rc3. I disabled the SUB_
variables, so it asked me for credentials during startup. This worked as expected, I was
able to enter them in the Terminal view. Everything seemed just fine:
{code}
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'cdkv2'...
==> default: Matching MAC address for NAT networking...
==> default: Setting the name of the VM: rhel-ose_default_1473941651986_62531
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Remote connection disconnect. Retrying...
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Registering box with vagrant-registration...
default: Would you like to register the system now (default: yes)? [y|n]y
default: username: mmalina1(a)redhat.com
default: password:
==> default: Registration successful.
==> default: Checking for guest additions in VM...
default: No guest additions were detected on the base box for this VM! Guest
default: additions are required for forwarded ports, shared folders, host only
default: networking, and more. If SSH fails on this machine, please install
default: the guest additions and repackage the box to continue.
default:
default: This is not an error message; everything may continue to work properly,
default: in which case you may ignore this message.
==> default: Configuring and enabling network interfaces...
==> default: Copying TLS certificates to
/Users/rasp/jbossqa/cdk2.2.rc3/cdk/components/rhel/rhel-ose/.vagrant/machines/default/virtualbox/docker
==> default: Mounting SSHFS shared folder...
==> default: Mounting folder via SSHFS: /Users/rasp => /Users/rasp
==> default: Checking Mount..
==> default: Checking Mount..
==> default: Folder Successfully Mounted!
==> default: Docker service configured successfully...
==> default: Running provisioner: shell...
default: Running: inline script
==> default: Running provisioner: shell...
default: Running: inline script
==> default: Running provisioner: shell...
default: Running: inline script
==> default:
==> default: Successfully started and provisioned VM with 2 cores and 3072 MB of
memory.
==> default: To modify the number of cores and/or available memory set the environment
variables
==> default: VM_CPU respectively VM_MEMORY.
==> default: You can now access the OpenShift console on:
https://10.1.2.2:8443/console
==> default: To use OpenShift CLI, run:
==> default: $ vagrant ssh
==> default: $ oc login
==> default:
==> default: Configured users are (<username>/<password>):
==> default: openshift-dev/devel
==> default: admin/admin
==> default:
==> default: If you have the oc client library on your host, you can also login from
your host.
{code}
But after it finished, I got an error pop up:
Server Container Development Environment failed to start.
An exception stack trace is not available.
And then the tooling stopped the box.
Need an interactive terminal that fits specific requirements
------------------------------------------------------------
Key: JBIDE-23039
URL:
https://issues.jboss.org/browse/JBIDE-23039
Project: Tools (JBoss Tools)
Issue Type: Feature Request
Components: server
Affects Versions: 4.4.1.AM2
Reporter: Rob Stryker
Assignee: Rob Stryker
Fix For: 4.4.2.AM1
Attachments: vagranttty.png
CDK Tools requires a terminal that allows interactivity of i/o. The full set of
requirements is a bit difficult to find a solution for.
1) I must be able to get a Process or IProcess object when a command is run
2) I must be able to get an event or know when the process terminates
3) The terminal or console must be interactive and allow user input when prompted.
4) It must behave as in 3) for 'vagrant' commands and any and all associated
plugins.
These three requirements thus far seem impossible to solve. Solutions that have been
attempted are:
1) Creating a java Process by myself via Runtime.exec. The interactive prompts never
arrive and there is no API for Process to know when it is waiting for input.
2) Using the external-tools launch configuration. When running a command like mvn, the
console that pops up seems to allow input from the user, and functions as expected.
However, when running a command such as vagrant, such prompts are not provided. In our
usecase, the following behavior is observed:
a) During vagrant-registration prompts, the console indicates it is not a TTY terminal
and cannot allow input
b) During a landrush prompt for superuser status, no prompt is made, no TTY message is
listed, and the process appears to have frozen
3) Launching / Opening a tm.terminal view. This solution fails requirements 1 and 2. We
are not able to get a Process or an IProcess when a command is launched in a proper
interactive terminal. This means we can have no way to know when the process has
completed.
Other options have been explored but ended up at dead ends and not worth mentioning. The
real question is why interactive behavior is visible when using external-tools launch
config for maven, but is not visible when running vagrant.
Is this a function of the way the vagrant commands display or prompt for input? Why does
vagrant-registration require a TTY terminal, but maven does not? Is this something that
can be fixed upstream?
No other obvious solutions have presented themselves in the past year.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)