Ask Your Question

HoangDo's profile - activity

2015-03-13 14:07:06 -0500 received badge  Famous Question (source)
2015-02-04 09:54:25 -0500 received badge  Famous Question (source)
2014-12-10 02:45:54 -0500 received badge  Famous Question (source)
2014-12-04 03:01:43 -0500 received badge  Famous Question (source)
2014-09-02 05:14:35 -0500 received badge  Famous Question (source)
2014-08-12 02:06:42 -0500 received badge  Notable Question (source)
2014-08-10 22:34:45 -0500 received badge  Famous Question (source)
2014-07-29 03:06:59 -0500 commented answer Heat run user-data before create user

Seems like I have to workaround like you said.

By the way, I'm quite confuse about this: If I launch Ubuntu instance by nova, it only created an ubuntu user (default user). But if I launch the same image by Heat, it created an ec2-user user (instead of ubuntu). Do you have any idea about it?

2014-07-29 03:00:41 -0500 received badge  Notable Question (source)
2014-07-28 08:31:30 -0500 answered a question Add user-data to an instance that is already running

What's the point of adding user-data to a running VM. As I understand, user-data will be run with cloud-init (when booting instances). If the instances are already running, what events will trigger user-data?

(Please correct me if I'm wrong)

2014-07-25 10:33:41 -0500 received badge  Popular Question (source)
2014-07-22 20:52:37 -0500 received badge  Notable Question (source)
2014-07-22 20:50:05 -0500 received badge  Popular Question (source)
2014-07-22 02:51:18 -0500 commented answer unable to open wordpress sample website by ip address

There is a possiblity that wordpress hadn't installed in the VM. Which OS image did you use. Could you paste the log /var/log/cloud-init-output.log here

2014-07-21 08:38:39 -0500 received badge  Famous Question (source)
2014-07-21 08:16:49 -0500 answered a question unable to open wordpress sample website by ip address

if you use this template wordpress, output is the private IP of the instance, so you can't access it from outside.

Try to associate instance with a floating IP instead. If you are still unable to open website, login to the instance and check the log file

sudo vim /var/log/cloud-init-output.log

check if user-date was executed correctly or not.

2014-07-18 09:51:09 -0500 asked a question Heat run user-data before create user

Hello everyone,

I'm trying to run HOT chefserver script and I got this error:

Expected process to exit with [0], but received '1'
---- Begin output of bin/bootstrap-chef-server ----
STDOUT:
STDERR: erlexec: HOME must be set
---- End output of bin/bootstrap-chef-server ----

But when I log in to the VM, the HOME was already set:

echo $HOME
/home/ec2-user

I guessed this error happens because user-data was run before ec2-user created. I used Ubuntu image, it auto-create ec2-user

Is my guess true? How can I solve this problem?

2014-07-18 09:51:09 -0500 received badge  Taxonomist
2014-07-18 09:24:25 -0500 asked a question Instance hostname not match with dns

Hi guys,

I observed a strange thing happens on my instances: the hostname is not match with 127.0.0.1 IP in hosts:

  • /etc/hostname: mychefserver

  • /etc/hosts: 127.0.0.1 localhost

I used neutron gre network and ubuntu image

Do you have any idea what's wrong here?

2014-07-15 12:03:23 -0500 received badge  Notable Question (source)
2014-07-14 03:56:24 -0500 received badge  Popular Question (source)
2014-07-11 09:44:30 -0500 commented question nova-novncproxy service fail to start

Perhaps it's due to misconfiguration. Paste your nova.conf file (novnc part) of both controller and compute node for more detail

2014-07-10 10:53:30 -0500 commented answer wait condition in HOT heat template

you have the point, Eric. I just encounter it right now. depends_on doesn't wait for user_data to finish.

sorry for bad answer. I'll test wait condition. I'm following this question as well.

2014-07-10 09:49:31 -0500 commented question Heat can't connect to docker server on VM

Thanks Shankar, I did check that post. The answer is removing end-point, that will make container run directly on compute node, and we can't use nova scheduler or neutron network.

I need to use endpoint, so it didn't work.

2014-07-10 08:36:29 -0500 answered a question wait condition in HOT heat template

This script I used depends on, it worked:

https://gist.github.com/dohuyhoang/74...

You can change type:Docker to a normal OS Server to test.

2014-07-10 08:01:07 -0500 asked a question Heat can't connect to docker server on VM

Hi guys,

I installed docker plugin for heat. Then I try create a HOT script to test:

https://gist.github.com/dohuyhoang/74c2baf125279adb69ee

getdocker.sh is simply a downloaded version of #include https://get.docker.io

The script is modified from this example, since the example is incorrect. Strangely, I got this error when heat creating container:

Resource Create Failed: Connectionerror: Httpconnectionpool(Host='46.105.252.218', Port=80): Max Retries Exceeded With Url: /V1.9/Containers/Create (Caused By <Class 'Socket.Error'>: [Errno 113] Ehostunreach)

I checked on the VM, docker is successfully installed, but it run on local socket:

 http:///var/run/docker.sock/v1.13/

Heat can't connect to that socket. Did I misconfigured docker plugin?

2014-07-10 05:46:19 -0500 received badge  Nice Answer (source)
2014-07-10 04:13:28 -0500 answered a question How to Deploy OpenStack according to my own desires?
  1. OpenStack is written in Python, so if you change some source code or configuration, simply restart the service for the changes to take effect. For example, if you change dashboard logo, restart apache, horizon; if you change neutron source code, restart neutron-server service. You only need to run stack.sh one time at the begining.

    DevStack is all-in-one-node OpenStack. DevStack is sufficient for development. You should configure DevStack environment similar to the target environment that you want to deploy your app. For example, I used to dev a plugin for Sahara on DevStack with Nova network, and while deploying it on OpenStack Neutron, it didn't work at all.

    If you want to gain deep understanding about OpenStack, try to deploy OpenStack step by step on multi-nodes env. If you only need an env to dev app, use DevStack.

  2. To deploy OpenStack on multiple nodes, I used OpenStack chef recipe.You can try to use Puppet. Check this page for more detail. You can use chef to deploy Rackspace Private Cloud, a enterprise-ready version of OpenStack. It seems promising, but I haven't test it yet.

No question is stupid. Hope it helps.

2014-07-10 03:12:46 -0500 commented question add a public IP subnet to a network

Sure, I updated my blog at

http://dohuyhoang.github.io/openstack...

Hope it can help.

2014-07-09 11:53:51 -0500 received badge  Popular Question (source)
2014-07-09 11:53:51 -0500 received badge  Notable Question (source)
2014-07-09 08:14:19 -0500 received badge  Famous Question (source)
2014-07-08 03:57:33 -0500 received badge  Notable Question (source)
2014-07-07 11:08:45 -0500 received badge  Popular Question (source)
2014-07-07 09:04:33 -0500 asked a question Packets can't go from router inner interface to vm

I got a very strange behavior that drived me crazy a whole day:

  • I assign a VM with a floating IP.
  • From the VM, I can ping to the internet OK.
  • From the outside random host, I can't ping to the VM.

Then I start tcpdump to see waht happened. On neutron router:

sudo ip netns exec qrouter-f918cbb7-dc0c-4713-a6f5-3c66b46e12cf tcpdump -i qg-0103d6fa-31
15:58:09.913759 IP 146.187.3.109.rev.sfr.net > 46.105.252.218: ICMP echo request, id 47245, seq 126, length 64

sudo ip netns exec qrouter-f918cbb7-dc0c-4713-a6f5-3c66b46e12cf tcpdump -i qr-343ab2cb-f5

15:56:40.209776 IP 146.187.3.109.rev.sfr.net > 192.168.100.44: ICMP echo request, id 47245, seq 37, length 64
15:56:41.217209 IP 146.187.3.109.rev.sfr.net > 192.168.100.44: ICMP echo request, id 47245, seq 38, length 64
15:56:42.225567 IP 146.187.3.109.rev.sfr.net > 192.168.100.44: ICMP echo request, id 47245, seq 39, length 64

I got the ICMP request on both interfaces of the ex-router, so everything is OK.

But on the VM, I got no ICMP request, only get repeatively ARP request. The VM did reply its MAC address. I checked ARP table on router and found that it got MAC address of VM OK (192.168.100.44):

sudo ip netns exec qrouter-f918cbb7-dc0c-4713-a6f5-3c66b46e12cf arp                         
Address                  HWtype  HWaddress           Flags Mask            Iface
vss-gw-6k.fr.eu          ether   00:07:b4:00:00:02   C                     qg-0103d6fa-31
192.168.100.44           ether   fa:16:3e:38:69:78   C                     qr-343ab2cb-f5

Strangely, the VM received no ICMP after all. I don't know how to debug this case any more. Please help me with some leads.

UPDATE: I don't know if it is the case or not: the mac address of the tap device (on compute node) and the corresponding interface on VM is off:

tap:

tap2e901035-a4 Link encap:Ethernet  HWaddr fe:16:3e:be:28:23

interface on VM:

HWaddr fa:16:3e:be:28:23
2014-07-02 06:09:52 -0500 received badge  Famous Question (source)
2014-07-02 06:09:52 -0500 received badge  Notable Question (source)
2014-07-01 10:21:31 -0500 received badge  Popular Question (source)
2014-07-01 04:54:01 -0500 asked a question neutron router iptables not hit

I'm using OpenStack and OVS. This is my case:

  • From a remote host, I ping VM with floating IP A.
  • Local gateway received the echo request, then send a packet with IP A and MAC address A' (based on a fixed IP-MAC map on gateway)
  • The virtual router on host machine somehow receive the packet on its external interface (with MAC address B'). I checked it by tcpdump on external interface, and I got echo request message.
  • On the virtual router, there are NAT rules to translate address A to internal address 192.168.100.40:
Chain neutron-l3-agent-PREROUTING (1 references)
target     prot opt source               destination         
DNAT       all  --  anywhere             46.105.252.217       to:192.168.100.43
DNAT       all  --  anywhere             46.105.252.219       to:192.168.100.40

But the problem is those rules are never hit. I checked it with

iptables -t nat -L -v -n

and found out hit count of these rule = 0.

I don't know how can I debug this case. Is it because MAC address is different from router's MAC that packets are dropped? If yes, why tcpdump shows message?

If it passed MAC address check, why those packets didn't hit iptables rules. How can I debug this case?

2014-06-30 05:22:27 -0500 asked a question Translate MAC address before forward to router

Hi guys,

I hope some network experts can help me. I got one situation with the OpenStack external router NAT:

  • My DC router has a fixed map table: IP - MAC address. Every response packets to IP A will have DEST-MAC = MAC_OF_A.

So in my case:

  • If the VM wasn't assigned floating IP, it worked fine. Local IP is translated to OpenStack router ip: ROUTER_IP, then packets go to DC router, DC router response with MAC_OF_ROUTER_IP.
  • If the VM was assigned floating IP, it don't work anymore. OpenStack router translate Local IP to ASSIGNED_FLOATING_IP, then packets go to DC router, DC router response with MAC_OF_ASSIGNED_FLOATING_IP. Response packets come back to Network node, and they are rejected (perhaps because of a strange MAC address).

Do you have any solution for that case. I'm just a novice in networking so I don't know which tool to use. Should I add a middle layer to translate MAC addresses, which tool should I use?