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

Openstack restore tenant quota

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

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

The day before yesterday, I finally installed the main components of OpenStack. I wanted to create an instance to try the effect. Creating an instance with the minimum configuration failed. Then I debugged left and right. I kept testing to create an instance. I accidentally reached the tenant quota of 10 instances. The system refused to create it again. However, I still can't delete instance from dashboard interface. I have been stuck in deleting state. I am worried to death. The problem of instance creation failure has not been solved yet. This zombie instance problem appears again. I can't delete and debug the new instance.

After some Baidu, Google, finally found a way to delete zombie instances, because my instance was not successfully created, so there is actually no instance data on the compute node, but there are corresponding records in the database, according to the online method, deleted the database entries of related instances. The details are as follows:

Log in to mysql, try nova database, find out the instance id to delete, and then delete

delete from instances where id = '12';

Direct deletion will trigger foreign key restriction errors. You need to temporarily close foreign key checking first.

set foreign_key_checks=0;

delete from instances where id = '12';

Restore foreign key check

set foreign_key_checks=0;

So far, although the instance database data has been deleted, the instance occupancy displayed by the tenant quota still exists, because the relevant database entries during quota check still exist, and the relevant quota limit values need to be updated; after several searches, the relevant quota database entry quota_usages is found. For details, see http://blog.csdn.net/hackerain/article/details/8223125;

View quota_uses resource usage: (example only enables a minimal instance)

Update related resource entries

update quota_usages set in_use=0 where resource = "instances";

update quota_usages set in_use=0 where resource = "ram";

update quota_usages set in_use=0 where resource = "cores";

Open dashboard again, resource quota has been restored, you can continue to create instances.

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

Database

Wechat

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

12
Report