How to make my instance accessible from another machine in the same network, I've already asssign a floating IP?
Once you have assigned FIP,
1. verify you have ingress/egress allow on CIDR 0.0.0.0/0 rules configured on security-group.
2. Ping from other machine which is in same network as FIP.
If step 2 succeeds, then you should be able to access VM over network.
In case if step 2 fails, check below things.
Run neutron floatingip-list and check if you have FIP configured for Instance
Go to to nova-api and check logs for clue
Related
I want to assign a domain name to an internal openstack floating ip, to access the instance over the internet.
I checked that you can set dnsmasq_dns_servers = 1.1.1.1 and configure dhcp_agent.ini accordingly, it seems to be a step in the right direction, but i couldn't find a way to allocate domain name to openstack instance (via horizon or cli).
The dnsmasq server that is managed by the DHCP agent is used to implement DHCP in subnets where DHCP is enabled. It does not resolve hostnames. If you want to be able to resolve hostnames internally, you could look into running a DNS server in your subnet or maintaning a hostfile on each instance that needs to communicate with the instance.
You could look at Designate. That is the DNS as a Service component of OpenStack. It is also possible to integrate Designate with an external service to manage external DNS.
See SysEleven's How to set up DNS for a Server/Website.
It walks you through the process of:
Creating the zone,
adding the DNS record, and finally
making the zone authoritative in global DNS.
It assumes you can use the OpenStack CLI, but there's also documentation on doing the same thing with Terraform, which I'd recommend as it fully automates the entire infrastructure with infrastructure as code (IaC).
It should apply to any OpenStack provider.
I have 2 aws ec2 instances and facing reach-ability issue from one instance to another. Have checked for SG, IGW, and it looks fine. Have also added subnet in /etc/hosts.allow to allow the hosts.
Can someone please suggest how to debug this reach-ability issue ?
I'm trying with
telnet <ip of other ec2 instance> <port>
from one ec2 instance to check if one instance is able to connect to open port where service is running of other instance.
Can capturing packet trace from source and destination will help? If yes, what will be the command for it ?
Am curious about how OpenStack handles IP configuration, i have a complete working openstack dashboard with a static IP of 192.168.1.73/24 and i want to change it to something else. Running as a VM using RHEL\Scientific Linux\Centos 7.5 as the Guest Host.
Am running openstack-queens (repo) -- /etc/yum.repos.d
What i've tried and failed...
1.Changing static IP in /etc/sysconfig/network-scripts/ifcfg-eth0
2.Made sure in /etc/resolv.conf reflects my new configuration.
2.Replacing IP configuration in packstack-answerfile for the compute node and the rest of the services i've configured.
What i have noted!!!
1.systemctl status -l redis.service --- fails when i change the IP configuration, this is active (running) with its initial configuration.
2.Virtualization daemon also fails during boot--(running as KVM)
How "deep" does Networking go for OpenStack and how do i achieve my goals of setting a different IP and still have my dashboard up and running?
This was Easy. What I missed to do is to only re-run my packstack answerfile.
First, change the IP address on the machine in /etc/sysconfig/network-scripts/ifcfg-br-ex thats if you already gone ahead in setting up networking for your OpenStack Env.
If you have done a backup of your ifcfg-eth0, revert to it and change to new IP configuration.
Second, Replace new IP configuration in packstack-answerfile for the compute node and the rest of the services configured.
Last But not Least: Requires Steady Internet Connection!!!
Last Step is to re-run your packstack-answerfile with the new IP configuration.
I am trying to setup a consul server in an openstack cluster. I have the server provisioned and have associated an IP with the server that is accessible from vagrants on developer machines.
I am able to join the server from a local vagrant if I use the -advertise flag on the consul agent -server command and use the floating ip I set. However, I am provisioning the server with salt and need to the machine to be able to determine that IP automatically.
By default, the server is using its bind address which is set to its 10.x.x.x local IP. That local IP is the only one I seem to be able to easily determine.
Is there a way to get an instance's floating ip(s)?
Bonus points: Is there a way to get an instances name?
The information you are looking for is available to an instance using the Openstack metadata service. It is basically a REST API that an instance can hit to get information specific to this instance. See more information here:
http://docs.openstack.org/grizzly/openstack-compute/admin/content/metadata-service.html
You should be able to get both the instance name and its floating ip (look for "public-ipv4")
I want to know how does the openstack assign ip to virtual machines ? and how to find out port and ips used by the VM. Is it possible for us to find out the IP and ports being used by an application running inside the VM ?
To assign an IP to your VM you can use this command:
openstack floating ip create public
To associate your VM and the IP use the command below:
openstack server add floating ip your-vm-name your-ip-number
To list all the ports used by applications, ssh to your instance and run:
sudo lsof -i
Assuming you know the VM name
do the following:
On controller run
nova interface-list VM-NAME
It will give you port-id, IP-address and mac address of VM interface.
You can login to VM and run
netstat -tlnp to see which IP and ports being used by applications running inside the VM.
As to how a VM gets IP, it depends on your deployment. On a basic openstack deployment when you create a network and create a subnet under that network, you will see on the network node a dhcp namespace getting created. (do ip netns on network node). The namespace name would be qdhcp-network-id. The dnsmasq process running inside the dhcp namespace allots IPs to VM. This is just one of the many ways in which VM gets IP.
This particular End User page of the official documentation could be a good start:
"Each instance can have a private, or fixed, IP address and a public, or floating, one.
Private IP addresses are used for communication between instances, and public ones are used for communication with the outside world.
When you launch an instance, it is automatically assigned a private IP address that stays the same until you explicitly terminate the instance. Rebooting an instance has no effect on the private IP address.
A pool of floating IPs, configured by the cloud operator, is available in OpenStack Compute.
You can allocate a certain number of these to a project: The maximum number of floating IP addresses per project is defined by the quota.
You can add a floating IP address from this set to an instance of the project. Floating IP addresses can be dynamically disassociated and associated with other instances of the same project at any time.
Before you can assign a floating IP address to an instance, you first must allocate floating IPs to a project. After floating IP addresses have been allocated to the current project, you can assign them to running instances.
You can assign a floating IP address to one instance at a time."
There are of course deeper layers to look at in this section of the Admin Guide
Regarding how to find out about ports and IPs, you have two options: command line interface or API.
For example, if you are using Neutron* and want to find out the IPs or networks in use with the API:
GET v2.0/networks
And using the CLI:
$ neutron net-list
You can use similar commands for ports and subnets, however I haven't personally tested if you can get information about the application running in the VM this way.
*Check out which OpenStack release you're running. If it's an old one, chances are it's using the Compute node (Nova) for networking.