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

Problem with fabfile #19

Closed
kent37 opened this issue Nov 29, 2010 · 6 comments
Closed

Problem with fabfile #19

kent37 opened this issue Nov 29, 2010 · 6 comments

Comments

@kent37
Copy link

kent37 commented Nov 29, 2010

The fabfile integration seems to be broken for EC2 instances, the fabfile is run with the name of the instance from aws.conf rather than the public_dns_name of the running server. I think this was broken in d671f7f.

@fschulze
Copy link
Member

Are you using the fabfile directly? You should use ./bin/aws do [instance-name] [fabric options]

@kent37
Copy link
Author

kent37 commented Nov 29, 2010

I use the command aws do dynamic_canvas show_in_browser. show_in_browser just opens a webbrowser to the host. It is going to http://dynamic_canvas instead of the actual EC2 name. The code for do_cmd() sets hoststr = argv[0] which is the instance name from the config file. That is passed as the -H argument to fab.

Prior to the revision I cited, hoststr was set to the host result of calling init_ssh_key() which is the public_dns_name for the instance.

@kent37
Copy link
Author

kent37 commented Nov 30, 2010

OK, I get it. The translation from instance name to public DNS name happens in HostConnectionCache in fabric_integration.py. This means that the host name in the fabfile is the instance name and the public DNS name is not available to the fabfile.

@fschulze
Copy link
Member

I guess the best fix then would be to expose the public and maybe private DNS name to the fabfile.

@kent37
Copy link
Author

kent37 commented Nov 30, 2010

Yes. Ideally the host name passed to the fabfile would be the correct hostname.

@fschulze
Copy link
Member

The env contains server which is the instance object which has all one needs, like the config etc.

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

No branches or pull requests

2 participants