Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bootstrap] Set JAVA_HOME and PATH for building zookeeper #4883

Conversation

brirams
Copy link
Collaborator

@brirams brirams commented May 28, 2019

While trying to reproduce #4870, I was unable to setup a vagrant environment from a fresh master without setting these two environment variables since ant depends on them.

@brirams brirams requested a review from sougou as a code owner May 28, 2019 01:36
@sougou sougou requested review from rafael and deepthi June 1, 2019 22:29
Copy link
Member

@deepthi deepthi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this. Does the Vagrant setup even call bootstrap.sh?
I would have thought that any changes for vagrant need to go into vagrant/bootstrap_vm.sh.

@rafael
Copy link
Member

rafael commented Jun 3, 2019

@deepthi - vagrant/bootstrap_vm.sh is to provision the vagrant machine. Once the machine is provisioned, it uses this script. In a way, one the Vagrant setup does is automated the instructions provided in:

https://vitess.io/docs/tutorials/local/

@rafael
Copy link
Member

rafael commented Jun 3, 2019

@brirams , could you fix the DCO?

@deepthi
Copy link
Member

deepthi commented Jun 3, 2019

@brirams when you fix the DCO, also fix the typo in the commit message: any -> ant

Signed-off-by: Brian Ramos <brirams@users.noreply.github.com>
@brirams brirams force-pushed the brirams_set_java_home_and_path_for_ant branch from 911e43c to 480deb7 Compare June 3, 2019 17:45
@deepthi
Copy link
Member

deepthi commented Jun 3, 2019

@deepthi - vagrant/bootstrap_vm.sh is to provision the vagrant machine. Once the machine is provisioned, it uses this script. In a way, one the Vagrant setup does is automated the instructions provided in:

https://vitess.io/docs/tutorials/local/

Ok, now I see the call to bootstrap.sh inside build.sh. I missed it at first glance.
Won't this break anyone who is running a different version of the jvm or has it installed in a different place? In which case it should go into build.sh before the call to bootstrap.sh so that it is done only for the vagrant build.

@st-cyrill
Copy link

st-cyrill commented Jun 14, 2019

Same problem.
I think it should go into vitess/vagrant-scripts/vitess/build.sh before call ./bootstrap.sh

export JAVA_HOME=$(readlink -f /usr/bin/javac | sed "s@/bin/javac@@")

It works ok.

@rafael
Copy link
Member

rafael commented Jun 14, 2019

@deepthi - How about we don't set it if it's already set in the path? That should cover both cases.

@deepthi
Copy link
Member

deepthi commented Jun 16, 2019

@deepthi - How about we don't set it if it's already set in the path? That should cover both cases.

If I understand correctly, you are suggesting that if java is already in the path, then you don't set JAVA_HOME? That should work. Though it would be preferable to isolate this in the vagrant setup.

Copy link
Contributor

@dkhenry dkhenry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will break anyone who isn't using Java-7

@brirams
Copy link
Collaborator Author

brirams commented Jul 1, 2019

yup -- will give this another look this week. thx!

@deepthi
Copy link
Member

deepthi commented Jul 24, 2019

@brirams can this be closed since #4995?

@brirams
Copy link
Collaborator Author

brirams commented Jul 27, 2019

yes! zookeeper now builds correctly but the vagrant start script fails because it's trying to use the etcd topo instead of zk2, as it's been configured. Think that broke here: #5003. I'll close this out and create another PR with the appropriate fix. thanks!

edit: #5029

@brirams brirams closed this Jul 27, 2019
@brirams brirams deleted the brirams_set_java_home_and_path_for_ant branch July 31, 2019 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants