Commit 6c73e06
committed
fix: Handle duplicate resource exception and update urllib3
1. Fix duplicate resource exception handling across OpenStack modules:
- OpenStack SDK changed exception message format
- Old: 'Multiple matches found for...'
- New: 'More than one {Resource} exists with the name...'
- Update exception check to handle both message formats
- Applied to: image.py, server.py, volume.py
2. Fix server.created_at attribute:
- Use 'created_at' instead of 'created' for Server objects
- Bug introduced during shade to openstacksdk migration (2023)
- Applied to: server.py lines 27, 92
3. Update urllib3 requirement:
- Change from 'urllib3<2.1.0' to 'urllib3>=1.26.15,<3.0.0'
- Resolves dependency conflict warnings
- Supports newer urllib3 2.x while maintaining compatibility
Fixes builder-openstack-cron job failures.
Issue: AttributeError: 'Server' object has no attribute 'created'
Issue: More than one Image/Server/Volume exists with the name
Issue: urllib3 version conflict
Change-Id: I4561bd1092c81c31e730fb21a2788966128049c1
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>1 parent 1879e8c commit 6c73e06
4 files changed
Lines changed: 17 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
123 | 126 | | |
124 | 127 | | |
125 | | - | |
| 128 | + | |
126 | 129 | | |
127 | 130 | | |
128 | 131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
92 | | - | |
| 94 | + | |
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
61 | 64 | | |
62 | 65 | | |
63 | | - | |
| 66 | + | |
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
0 commit comments