Bug 1145132
| Summary: | Domain validation fails when adding size due to previously removed size | ||
|---|---|---|---|
| Product: | OpenShift Online | Reporter: | Luke Meyer <lmeyer> |
| Component: | Pod | Assignee: | Abhishek Gupta <abhgupta> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | libra bugs <libra-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 2.x | CC: | erich, jhou, jokerman, libra-bugs, libra-onpremise-devel, mmccomas, tiwillia |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | 1144057 | Environment: | |
| Last Closed: | 2015-02-18 16:51:07 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1144057 | ||
|
Description
Luke Meyer
2014-09-22 12:49:17 UTC
We are adding checks and repair logic to oo-admin-chk and oo-admin-repair scripts. https://github.com/openshift/origin-server/pull/5849 Commit pushed to master at https://github.com/openshift/origin-server https://github.com/openshift/origin-server/commit/63dfd54e020d41ef12728cb9b5d954660a5a0b9c Bug 1145132 - Domain validation fails when adding size due to previously removed size We have not made any changes in the domain validations and are not removing invalid gear sizes from users/domains silently. The approach taken is to just leave the cleanup of the bad data (invalid gear sizes) to admins. Just to clarify what's changing here... it sounds like you've added something to allow the admin to fixup existing domains with oo-admin-repair. In which case, the procedure for removing a gear size would be something like: 1. Nuke all of the nodes for that size 2. Remove the size from broker.conf 3. Run oo-admin-repair to remove now-invalid gears and districts from MongoDB 4. Run oo-admin-repair --gear-sizes to remove the invalid size from users and domains. Is that about right? I think we can work with that, just need to document it somewhere. Incidentally, could oo-admin-repair be used to implement step 1 more cleanly? I.e. if a node has a now-invalid gear profile, remove all its gears and un-district it such that it can easily be repurposed for another profile? Otherwise the user has to manually remove gears and reset district.info, or reinstall. In addition to the PR above, there was another earlier commit that was part of this --> https://github.com/abhgupta/origin-server/commit/972efc1ce95a06ec3c4f85c0b32bd1b3f4d007b0 Yes, today we have means to identify unresponsive nodes and deal with the gears on them. We could make changes to allow the script to handle these situations as the trigger to reach the same state and take the same actions subsequently. That will need to be dealt with as a separate RFE/trello card. Verified on devenv_5219
Steps:
1. Create a small gear
2. Remove small gear size from /etc/openshift/broker-dev.conf, add 'newsize' to VALID_GEAR_SIZES. Run `rhc domain-list`, the default small gear size is already removed from domain.
3. Attempt to add the 'newsize' to the user, new gear size added successfully.
4. Run oo-admin-chk, the inconsistent user capability is detected
5. Fix it with oo-admin-repair, and run oo-admin-chk again.
Result:
After step 3:
[root@ip-10-167-171-74 ~]# oo-admin-ctl-user -l jhou --addgearsize newsize
Adding gear size newsize for user jhou... Done.
User jhou:
plan: free
plan quantity: 1
plan expiration date:
consumed domains: 1
max domains: 1
consumed gears: 1
max gears: 3
max tracked storage per gear: 0
max untracked storage per gear: 0
max teams: 0
viewing all global teams allowed: false
plan upgrade enabled: true
gear sizes: newsize
sub accounts allowed: false
private SSL certificates allowed: false
inherit gear sizes: false
HA allowed: false
After step 4:
Finished at: 2014-10-08 10:06:56 UTC
Total time: 41.021s
Some users have invalid gear sizes in their capabilities: small
FAILED
Please refer to the oo-admin-repair tool to resolve some of these inconsistencies.
After step 5:
[root@ip-10-167-171-74 ~]# oo-admin-repair --gear-sizes -v
Started at: 2014-10-08 10:16:22 UTC
Total gears found in mongo: 1
Some users have invalid gear sizes in their capabilities: small
Removing invalid gear sizes (small) from all users... Done.
Finished at: 2014-10-08 10:16:22 UTC
Total time: 0.112s
SUCCESS
[root@ip-10-167-171-74 ~]# oo-admin-chk
Started at: 2014-10-08 10:16:55 UTC
User data populated in 0 seconds
Domain data populated in 0 seconds
District data populated in 0 seconds
Total gears found in mongo: 1
Application data populated in 0 seconds
Usage data populated in 0 seconds
Fetched all gears in 20 seconds
Total gears found on the nodes: 1
Total nodes that responded: 1
Checked application gears on nodes in 0 seconds
Checked application gears on nodes (reverse match) in 0 seconds
Finished at: 2014-10-08 10:17:16 UTC
Total time: 20.898s
SUCCESS
|