Camelia, the Perl 6 bug

IRC log for #kaizendo, 2012-04-03

| Channels | #kaizendo index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
08:26 ssm_ sjn: the badius VM will be migrated to another SAN pool, there will be some downtime today.
08:26 ssm_ (current storage pool has "issues")
10:46 sjn ook
10:46 sjn thanks for the heads-up :)
10:47 sjn ssm_: new IP addresses?
10:50 sjn ssm_: old IP addressess seem to be unroutable at least
11:34 ssm_ There should not be an IP address change, but migration may take a bit of time.  Lots of data to be moved from SAN to SAN.
11:35 sjn ook
11:36 sjn any rough ETA?
11:36 sjn like.... thursday? or by week 15? :)
11:37 ssm_ "today"
11:38 * ssm_ is not at the office, and is working on a perl based project.
11:38 ssm_ Mojolicious is _fun_ :D
11:38 sjn yep :)
11:39 sjn I've noticed that too
11:40 ssm_ Just trying to figure out how to sort after an arbitrary set of values.  2 > 1 > 3 > 0 > anything else....
11:40 sjn to the point that I've started playing with moving kaizendo to it...
11:41 ssm_ Should not be impossible, and could be very rewarding.  It just takes time and effort.
11:41 sjn re: sorting; you'll have to make a lookup list
11:41 ssm_ just an abstraction layer hash?
11:41 sjn if you're playing with numbers, maybe an array is enough
11:42 ssm_ just numbers
11:42 sjn what can "anything else" be? positive integers? also negative integers?
11:42 ssm_ The lookup list should not be impossible :)
11:43 * ssm_ is trying to sort nagios host and service status.  0 = ok, 1 = warning, 2 = critical, 3 = unknown, 4 = dependent.  I want criticals and warnings first....
11:44 ssm_ and the list is slightly different for hosts and services.
11:44 ssm_ I'll try using a lookup list.  It makes sense.
11:44 ssm_ thanks :)
11:46 sjn sort { $weight{$a} <=> $weight{$b} } @status_codes
11:47 sjn my %weight = ( ok => 0, warning => 1, critical => 2, ...);
11:47 ssm_ yup, and my $weight = { 0 => 4, 1 => 1, 2 => 0, ...}
11:47 ssm_ possibly more readable with labels :)
11:47 sjn yeah
11:48 ssm_ to be a bit better on the wtf-o-meter...
11:48 sjn and if you find out the sorting direction is wrong, just switch $a and $b :)
11:48 ssm_ I've already got small monstrosities like:
11:48 ssm_ % foreach my $service ( sort { $b->{state} <=> $a->{state} || $b->{last_state_change} <=> $a->{last_state_change} } @{ $status_content } ) {
11:49 ssm_ (to be moved to a helper function instead of being in the template)
11:49 sjn hm
11:49 sjn the name $service doesn't make sense there
11:50 ssm_ used later with               %= $service->{host_name}
11:50 ssm_ inside the loop
11:50 ssm_ I could probably use $_->{host_name}, but I've decided I didn't like that....
11:50 sjn well then you should change $status_content to @services or something like that :)
11:51 sjn doing lookups is fine :)
11:51 sjn no problem with that
11:51 ssm_ $status_content is a ref that comes from the Mojo "stash" function
11:51 ssm_ ...in the controller
11:51 sjn just commenting that then name of a singular item in a list doesn't match the name of the list :)
11:52 ssm_ ah, $service and @services...
11:52 sjn yep
11:52 ssm_ right :)
11:52 sjn e.g. foreach my $car (@car_pool) { say $car->insurance_paid() }
12:04 ssm_ yay, worked like a charm :)
12:05 sjn sweet :)
12:30 ssm_ badius is up again, by the way...
12:32 sjn same IP?
12:55 ssm_ yes.  The disk volume was migrated from one SAN to another, no changes inside the VM.
12:58 ssm_ After getting help from a "support" rep from Orrible, we had to move everything stored on that SAN...
12:58 ssm_ . o { #$%^#%^*@$%^ }
12:59 sjn :-\
13:00 ssm_ (story best told at $pub)
13:01 sjn hm.
13:01 sjn oslo.pm pub tomorrow?
13:10 * ssm_ is busy every wednesday
13:10 ssm_ although, perhaps not this week.  Should check...

| Channels | #kaizendo index | Today | | Search | Google Search | Plain-Text | summary