In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to access Metadata through dhcp-agent. The content of the article is of high quality, so the editor shares it for you as a reference. I hope you will have some understanding of the relevant knowledge after reading this article.
OpenStack communicates with nova-metadata-api by default by creating and managing neutron-ns-metadata-proxy through l3-agent. But not all environments have l3-agent, such as scenarios where physical router is used directly. At this point, you need to take a different path: let dhcp-agent create and manage the neutron-ns-metadata-proxy.
Open / etc/neutron/dhcp_agent.ini and set force_metadata
After restarting dhcp-agent, you can see that there is an additional neutron-ns-metadata-proxy process on the control node.
This process is associated to the test_net through-- network_id, which is the neutron-ns-metadata-proxy initiated by dhcp-agent to receive metadata requests from instance on the test_net network. Each network has a corresponding neutron-ns-metadata-proxy.
Restart instance C1 to view the routing table.
Notice that the route for access to 169.254.169.254 has now changed from 17.17.17.1 to 17.17.17.2. 17.17.17.2 here is the IP of dhcp-agent on test_net. This route is added by dhcp-agent. Because of this route, even if l3-agent and dhcp-agent provide neutron-ns-metadata-proxy services at the same time, metadata requests will only be sent to dhcp-agent.
At the same time, we also see that dhcp-agent has configured IP 169.254.169.254 to itself. In other words, the http://169.254.169.254 of C1's request to access metadata is actually sent to port 80 of dhcp-agent. It is the neutron-ns-metadata-proxy process started by dhcp-agent that listens on port 80.
The rest of the data flows in the same way as in the l3-agent scenario: neutron-ns-metadata-proxy sends the request to neutron-metadata-agent via unix domain socket, which in turn sends it to nova-api-metadata through the management network.
So far, we have discussed the implementation of accessing metadata through l3-agent and dhcp-agent, respectively. For 169.254.169.254:
L3-agent uses iptables rules to forward.
Dhcp-agent configures this IP to its own interface.
I don't know if you have such a question:
How does nova-api-metadata know which instance's metadata should be returned? C1 simply sent a http request to 169.254.169.254.
On how to access Metadata through dhcp-agent to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.