the lxc:0 might be interesting to explore as it effectively ensures stable ip address between agents and state server. another option to try is to use juju-update-bootstrap to point all the machines in the environment to the new state server address. its for a different use case but its essentially performing the same functionality.
-kapil On Wed, Oct 15, 2014 at 9:08 AM, John Meinel <[email protected]> wrote: > You could probably edit the /var/lib/juju/agents/unit-*/agent.conf and > /var/lib/juju/agents/machine-*/agent.conf to change the IP addresses stored > there (everyone needs to know how to get back to the API server). > > Generally the API server filters out 127.0.0.1 when reporting its possible > addresses to other units, since *most* of the time they can't actually > contact it at 127.* > In fact, the only time it works is when they are colocated, if you used > containers or VMs the 127.* address wouldn't ever work. > And generally colocating your services with the API server is considered a > security issue. (You have to give your cloud credentials to the API server > if you want to let it start instances for you, but that information should > not be available to the services you deploy.) > > If you did deploy into containers (like juju deploy --to lxc:0) then the > services would be isolated, and likely the API server would get a 10.0.3.1 > address, which could be preserved between packing it up and putting it > somewhere else. > > John > =:-> > > > On Wed, Oct 15, 2014 at 9:46 AM, Vasiliy Tolstov <[email protected]> > wrote: > >> I'm try to deploy wordpress app inside packer via manual provider, >> inside packer i have addr 10.0.2.15 but in manual provider i'm use >> name 127.0.0.1. All work fine and services are running. After that i'm >> shutdown packer and move image to real server with address like >> 172.16.252.14, but nothing started after that: i have errors like: >> environment: manual >> machines: >> "0": >> agent-state: started >> agent-version: 1.20.9 >> dns-name: 127.0.0.1 >> instance-id: 'manual:' >> series: trusty >> hardware: arch=amd64 cpu-cores=1 mem=2001M >> state-server-member-status: has-vote >> services: >> mysql: >> charm: local:trusty/mysql-326 >> exposed: false >> relations: >> cluster: >> - mysql >> db: >> - wordpress >> units: >> mysql/0: >> agent-state: down >> agent-state-info: (started) >> agent-version: 1.20.9 >> machine: "0" >> public-address: 127.0.0.1 >> wordpress: >> charm: local:trusty/wordpress-1 >> exposed: true >> relations: >> db: >> - mysql >> loadbalancer: >> - wordpress >> units: >> wordpress/0: >> agent-state: down >> agent-state-info: (started) >> agent-version: 1.20.9 >> machine: "0" >> open-ports: >> - 80/tcp >> - 443/tcp >> public-address: 127.0.0.1 >> >> and in unit logs messages: >> 2014-10-15 05:46:03 INFO juju.state.api apiclient.go:242 dialing >> "wss://10.0.2.15:17070/" >> 2014-10-15 05:46:03 INFO juju.state.api apiclient.go:250 error dialing >> "wss://10.0.2.15:17070/": websocket.Dial wss://10.0.2.15:17070/: dial >> tcp 10.0.2.15:17070: no route to host >> 2014-10-15 05:46:03 ERROR juju.worker runner.go:218 exited "api": >> unable to connect to "wss://10.0.2.15:17070/" >> 2014-10-15 05:46:03 INFO juju.worker runner.go:252 restarting "api" in 3s >> >> >> Does it possible to avoid this or i need to modify juju db to fix address? >> -- >> Vasiliy Tolstov, >> e-mail: [email protected] >> jabber: [email protected] >> >> -- >> Juju mailing list >> [email protected] >> Modify settings or unsubscribe at: >> https://lists.ubuntu.com/mailman/listinfo/juju >> > > > -- > Juju mailing list > [email protected] > Modify settings or unsubscribe at: > https://lists.ubuntu.com/mailman/listinfo/juju > >
-- Juju mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju
