Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the process of getting metadata

2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Access to metadata process is how, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.

After starting neutron router, instance C1 finally got the metadata

C1 thinks that the metadata service address is 169.254.169.254 and the port is 80. Let's try to access metadata in C1.

You can really get metadata. But we know that nova-api-metadata runs on the control node, and IP is not 169.254.169.254. How is this achieved? Let's analyze this process.

The request for access to 169.254.169.254 from the routing table of C1 will go 17.17.17.1.

17.17.17.1 is actually the interface IP of test_router on test_net. This route is automatically added by OpenStack to instance, which forwards metadata's request to neutron router.

Ip netns is the command to manage linux network namespace. If you are not familiar with namespace, you can refer to the previous chapter of the tutorial.

Test_router receives a request from C1 and forwards it to port 9697 through iptable rules.

What is port 9697 for? This is the listening port of neutron-ns-metadata-proxy.

At this point, we can reorganize our thinking:

Instance requests metadata through the predefined 169.254.169.254.

The request is forwarded to neutron router.

Router forwards the request to neutron-ns-metadata-proxy.

Then it's simple: neutron-ns-metadata-proxy sends the request to neutron-metadata-agent through unix domain socket, which in turn sends it to nova-api-metadata through the management network.

OpenStack creates and manages neutron-ns-metadata-proxy through l3-agent by default. But not all environments have l3-agent, such as scenarios where physical router is used directly. At this point, you need to let dhcp-agent manage the neutron-ns-metadata-proxy.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report