More updates
This commit is contained in:
@@ -1280,3 +1280,202 @@ I think it's safe to not worry about these because customers can't deploy them y
|
||||
irb(main):067:0> LicenseActivation.eager_load(:license).eager_load(:licensee_product).where("licensee_products.slug LIKE '%windows%'").where("(licenses.data->>'cores')::integer > 0").count
|
||||
=> 538
|
||||
#+END_SRC
|
||||
|
||||
|
||||
** Find remaining hardware affected by missing processor components in the on-demand pool
|
||||
|
||||
#+begin_src ruby
|
||||
affected_servers = []
|
||||
Hardware::Server.reserved.provisionable.find_in_batches do |hbatch|
|
||||
hbatch.each do |h|
|
||||
affected_servers << h unless h.components.any? { |c| c.type == "ProcessorComponent" }
|
||||
end
|
||||
end
|
||||
|
||||
#+end_src
|
||||
|
||||
|
||||
#+begin_example
|
||||
irb(main):016:0> affected_servers.count
|
||||
=> 823
|
||||
#+end_example
|
||||
|
||||
|
||||
** Of the affected servers, which are the most affected plans?
|
||||
|
||||
#+begin_src ruby
|
||||
res = affected_servers.inject(Hash.new(0)) do |hm, srv|
|
||||
hm[srv.plan.slug] += 1
|
||||
hm
|
||||
end
|
||||
#+end_src
|
||||
|
||||
#+begin_example
|
||||
{:"c3.medium.x86"=>306,
|
||||
:"m3.large.x86"=>266,
|
||||
:"c2.medium.x86"=>113,
|
||||
:"n2.xlarge.x86"=>8,
|
||||
:"n3.xlarge.x86"=>68,
|
||||
:"m3.small.x86"=>16,
|
||||
:"m3.large.opt-c2"=>3,
|
||||
:"c3.small.x86"=>23,
|
||||
:"nvidia3.a30.large"=>3,
|
||||
:"n3.xlarge.opt-m4"=>4,
|
||||
:"m2.xlarge.x86"=>1,
|
||||
:"nvidia3.a30.medium"=>6,
|
||||
:"nvidia3.a40.medium"=>1,
|
||||
:"x.large.arm"=>1,
|
||||
:"s3.xlarge.x86"=>3,
|
||||
:"w3amd.75xx24c.256.4320"=>1}
|
||||
#+end_example
|
||||
|
||||
#+begin_src ruby
|
||||
p_slug = :"nvidia3.a30.large"
|
||||
#+end_src
|
||||
|
||||
|
||||
** starting cleanup
|
||||
|
||||
Metros
|
||||
#+begin_src ruby
|
||||
"am",
|
||||
"at",
|
||||
"ch",
|
||||
"da"
|
||||
"db",
|
||||
"dc",
|
||||
"fr",
|
||||
"he",
|
||||
"hk",
|
||||
"la",
|
||||
"ld",
|
||||
"ma",
|
||||
"mb",
|
||||
"md",
|
||||
"me",
|
||||
"mi",
|
||||
"ml",
|
||||
"mt",
|
||||
"mx",
|
||||
"ny",
|
||||
"os",
|
||||
"pa",
|
||||
"sg",
|
||||
"sk",
|
||||
"sl",
|
||||
"sp",
|
||||
"sv",
|
||||
"sy",
|
||||
"tr",
|
||||
"ty",
|
||||
"se",
|
||||
#+end_src
|
||||
|
||||
#+begin_src bash
|
||||
OUTFILE=deprovs_to_do
|
||||
touch $OUTFILE
|
||||
metros="am at ch da db dc fr he hk la ld ma mb md me mi ml mt mx ny os pa sg sk sl sp sv sy tr ty se"
|
||||
for metro in $metros
|
||||
do
|
||||
deprovs=$(bundle exec rake incident_2590:dry_run[$metro] | grep 'Would have queued a deprovision for hardware' | wc -l )
|
||||
echo "$metro: $deprovs" >> $OUTFILE
|
||||
done
|
||||
|
||||
bundle exec rake incident_2590:cleanup[at]
|
||||
bundle exec rake incident_2590:cleanup[ch]
|
||||
bundle exec rake incident_2590:cleanup[da]
|
||||
#+end_src
|
||||
|
||||
|
||||
** Queueing Deprovs 5/7
|
||||
|
||||
Started 3:30 PM
|
||||
#+begin_src bash
|
||||
bundle exec rake incident_2590:cleanup[at]
|
||||
bundle exec rake incident_2590:cleanup[ch]
|
||||
bundle exec rake incident_2590:cleanup[da]
|
||||
#+end_src
|
||||
|
||||
|
||||
Started 3:35 PM
|
||||
#+begin_src bash
|
||||
bundle exec rake incident_2590:cleanup[dc]
|
||||
bundle exec rake incident_2590:cleanup[fr]
|
||||
bundle exec rake incident_2590:cleanup[ny]
|
||||
bundle exec rake incident_2590:cleanup[sg]
|
||||
#+end_src
|
||||
|
||||
|
||||
Started: 5:20 PM
|
||||
|
||||
#+begin_src bash
|
||||
bundle exec rake incident_2590:cleanup[am]
|
||||
bundle exec rake incident_2590:cleanup[da]
|
||||
bundle exec rake incident_2590:cleanup[dc]
|
||||
bundle exec rake incident_2590:cleanup[fr]
|
||||
bundle exec rake incident_2590:cleanup[ny]
|
||||
bundle exec rake incident_2590:cleanup[sg]
|
||||
bundle exec rake incident_2590:cleanup[sv]
|
||||
bundle exec rake incident_2590:cleanup[ty]
|
||||
#+end_src
|
||||
|
||||
|
||||
** Queueing Deprovs 5/8
|
||||
|
||||
output from checking deprovs_to_do
|
||||
#+begin_example
|
||||
am: 0
|
||||
at: 3
|
||||
ch: 3
|
||||
da: 0
|
||||
db: 2
|
||||
dc: 10
|
||||
fr: 0
|
||||
he: 0
|
||||
hk: 2
|
||||
la: 3
|
||||
ld: 4
|
||||
ma: 2
|
||||
mb: 0
|
||||
md: 1
|
||||
me: 0
|
||||
mi: 1
|
||||
ml: 0
|
||||
mt: 0
|
||||
mx: 2
|
||||
ny: 30
|
||||
os: 1
|
||||
pa: 0
|
||||
sg: 8
|
||||
sk: 0
|
||||
sl: 2
|
||||
sp: 7
|
||||
sv: 47
|
||||
sy: 4
|
||||
tr: 0
|
||||
ty: 7
|
||||
se: 2
|
||||
#+end_example
|
||||
|
||||
#+begin_example
|
||||
bundle exec rake incident_2590:cleanup[at]
|
||||
bundle exec rake incident_2590:cleanup[ch]
|
||||
bundle exec rake incident_2590:cleanup[db]
|
||||
bundle exec rake incident_2590:cleanup[dc]
|
||||
bundle exec rake incident_2590:cleanup[hk]
|
||||
bundle exec rake incident_2590:cleanup[la]
|
||||
bundle exec rake incident_2590:cleanup[ld]
|
||||
bundle exec rake incident_2590:cleanup[ma]
|
||||
bundle exec rake incident_2590:cleanup[md]
|
||||
bundle exec rake incident_2590:cleanup[mi]
|
||||
bundle exec rake incident_2590:cleanup[mx]
|
||||
bundle exec rake incident_2590:cleanup[ny]
|
||||
bundle exec rake incident_2590:cleanup[os]
|
||||
bundle exec rake incident_2590:cleanup[sg]
|
||||
bundle exec rake incident_2590:cleanup[sl]
|
||||
bundle exec rake incident_2590:cleanup[sp]
|
||||
bundle exec rake incident_2590:cleanup[sv]
|
||||
bundle exec rake incident_2590:cleanup[sy]
|
||||
bundle exec rake incident_2590:cleanup[ty]
|
||||
bundle exec rake incident_2590:cleanup[se]
|
||||
#+end_example
|
||||
|
||||
Reference in New Issue
Block a user