Category Archives: Work

Based36 naming scheme for OpenStack servers

So, I am looking at doing large scale OpenStack deployments, one of the concerns with that is a naming format. Initially I was thinking something like “nn” for nova node and “nc” for nova controller etc. My large scale enterprise experience told me that would quickly become a horrible idea, especially considering the various ways that people are going to deploy this. With some thought and help from various colleagues I have come up with the following naming format… let me know your thoughts…

Naming format XXXXXXXYYYYZZZZ
All Base36 – XXXXXXX=Coded service list, YYYY=Cluster#, ZZZZ=Unit#
This gives 31 service bits, 1 Million cluster #s, and 1 Million unit #s
This creates a 15char unit name, the maximum allowed for MS NetBIOS names (although primarily *nix right now, we have to account for future growth into the Windows space)


From Right to left, binary to based36
000000000000000000000000000000000000 = 7char base36 XXXX from above.
|||||||||||||||||||||||||||||||||||'-Nova-API
||||||||||||||||||||||||||||||||||'-Nova-Compute
|||||||||||||||||||||||||||||||||'-Nova-Network
||||||||||||||||||||||||||||||||'-Nova-ObjectStore
|||||||||||||||||||||||||||||||'-Nova-Scheduler
||||||||||||||||||||||||||||||'-Nova-Volume
|||||||||||||||||||||||||||||'-Swift-Account
||||||||||||||||||||||||||||'-Swift-Auth
|||||||||||||||||||||||||||'-Swift-Container
||||||||||||||||||||||||||'-Swift-Object
|||||||||||||||||||||||||'-Swift-Proxy
||||||||||||||||||||||||'-Glance-API
|||||||||||||||||||||||'-Glance-Registry
||||||||||||||||||||||'-Future-Use
|||||||||||||||||||||'-Future-Use
||||||||||||||||||||'-Future-Use
|||||||||||||||||||'-Future-Use
||||||||||||||||||'-Future-Use
|||||||||||||||||'-Future-Use
||||||||||||||||'-Future-Use
|||||||||||||||'-Future-Use
||||||||||||||'-Future-Use
|||||||||||||'-Future-Use
||||||||||||'-Future-Use
|||||||||||'-Future-Use
||||||||||'-Future-Use
|||||||||'-Future-Use
||||||||'-Future-Use
|||||||'-Future-Use
||||||'-Future-Use
|||||'-Future-Use
||||'-Future-Use
|||'-Future-Use
||'-Future-Use
|'-Future-Use
'-Future-Use

Common Examples:
All Nova = 000001R
All Swift = 00001J4
All Glance = 00004QO
Nova+Swift = 00001KV
Swift+Glance = 000069S
All current = 00006BJ
All current & future = VKHSVLR

A full example of a machine running Nova and Swift, in the 1,002 cluster, unit number 12,643 (assuming this is the biggest cluster ever heh) would be...
00001KV00RU09R7

There are some variations possible, we could do XX

In theory this naming scheme would not need to be changed for a number of years. It also allows you to at a glance understand a servers original purpose or analyze a large scale implementation without requiring auditing or configuration databases. The obvious downside is that changing the services on a box would require a name change although in large systems usually service changes would use a migration box and the naming could be done there. The size of the name is a concern for ops people as well but I would expect copy/paste to be utilized from alerting/tickets etc. This is just an idea now that I will most likely start building installation process/automation around so any thoughts?

Note: These unit names should be auto generated through various setup utilities, anyone doing an install by hand probably wouldn’t need a naming scheme with large scale design, although I would highly recommend it if possible.

If you would like to comment please visit my blog directly http://www.jordanrinke.com/2011/01/05/based36-naming-scheme-for-openstack-servers/ ping me on twitter http://www.twitter.com/JordanRinke or find me on IRC on #OpenStack

Outlook macro to archive email

Here is an Outlook macro I whipped up a little while ago since my inbox was so insane I was having trouble even selecting all of the email in it. As you can see my version is heavily modified from a source article I found here ( http://blogs.iis.net/robert_mcmurray/archive/2010/02/25/outlook-macros-part-1-moving-emails-into-personal-folders.aspx )

There are a few things to note… use at your own risk is the first. Second, this only does a folder deep in the inbox mostly because I didn’t feel like writing a recursion method. There is limited error checking, I wanted it to crash vs try to survive and screw up my email. For this to work you must have a datafile added for each year in YYYY (2010, 2009, etc) format. The macro will attempt to create any subfolders that it needs. Macro is as follows, if you make any huge improvements to it please let me know.

Sub MoveOldEmails()
'NOTE: This does Sent Items, Inbox, and 1 folder below inbox. It will not do more than 1 folder deep in the inbox.
    ' Declare all variables.
    Dim objOutlook As Outlook.Application
    Dim objNamespace As Outlook.NameSpace
    Dim objInbox As Outlook.Folder
    Dim objSentbox As Outlook.Folder
    Dim objDestFolder As Outlook.Folder
    Dim objMail As Variant
    Dim intCount As Integer
    Dim intDateDiff As Integer
    Dim intAge As Integer

    'Move anything older than this date.
    intAge = 30

    ' Create an object for the Outlook application.
    Set objOutlook = Application
    ' Retrieve an object for the MAPI namespace.
    Set objNamespace = objOutlook.GetNamespace("MAPI")
    ' Retrieve a folder object for the inbox folder
    Set objInbox = objNamespace.GetDefaultFolder(olFolderInbox)
    'Retrieve a folder object for sent box folder
    Set objSentbox = objNamespace.GetDefaultFolder(olFolderSentMail)
    ' Note: Using cached mode with exchange is much faster, non-cached mode will take 1-2 seconds per email
    ' since a request is made for every object vs using a local cache.

    'Move sent items first.

    For intCount = objSentbox.Items.Count To 1 Step -1
        ' Loop through the items in the folder. NOTE: This has to
        ' be done backwards; if you process forwards you have to
        ' re-run the macro an inverese exponential number of times.
        Set objMail = objSentbox.Items.Item(intCount)
        intDateDiff = DateDiff("d", objMail.SentOn, Now)
        Debug.Print intDateDiff & ":" & objMail.SentOn
        'Move anything older than intAge
        If intDateDiff > intAge Then
            'Set blnFound to False, it will be set to true by logic if the folder does not need to be created
            blnFound = False
            For Each objFolder In objNamespace.Folders(CStr(Year(objMail.SentOn))).Folders
                'This is sloppy since we will loop through all of the folders to see if the folder exists
                'for every mail item, I could make an array and do a search on it but this should be run in
                'cached mode so there is not much of a difference. This is however, very much not optimal
                If objFolder.Name = objSentbox.Name Then
                    'If the current folder matches our search folder set blnFound to true to skip folder creation
                    blnFound = True
                End If
            Next
            If blnFound = False Then
                'Create the folder if it was not found
                objNamespace.Folders(CStr(Year(objMail.SentOn))).Add objSentbox.Name
            End If

            Debug.Print objMail.SentOn & ":" & objMail.Subject
            'Set the destination to the same structure as the source folder, i.e. "2010Sent Items"
            Set objDestFolder = objNamespace.Folders(CStr(Year(objMail.SentOn))).Folders(objSentbox.Name)
            'Move the object - technically mail is not the best name since this can be calendar items etc but I liked it more than "variant"
            objMail.Move objDestFolder
            'Destroy object for clarity
            Set objDestFolder = Nothing
        End If
    Next intCount

    'Next move everything in the root of the default Inbox
    For intCount = objInbox.Items.Count To 1 Step -1
        Set objMail = objInbox.Items.Item(intCount)
        intDateDiff = DateDiff("d", objMail.SentOn, Now)
        If intDateDiff > intAge Then
            blnFound = False
            For Each objFolder In objNamespace.Folders(CStr(Year(objMail.SentOn))).Folders
                If objFolder.Name = objInbox.Name Then
                    blnFound = True
                End If
            Next
            If blnFound = False Then
                objNamespace.Folders(CStr(Year(objMail.SentOn))).Add objInbox.Name
            End If

            Debug.Print objMail.SentOn & ":" & objMail.Subject
            ' folder structure i.e. "2010Inbox"
            Set objDestFolder = objNamespace.Folders(CStr(Year(objMail.SentOn))).Folders(objInbox.Name)
            objMail.Move objDestFolder
            Set objDestFolder = Nothing
        End If
    Next intCount

   'Loop through all the folders in the inbox
    For intFolderCount = 1 To objInbox.Folders.Count
        For intCount = objInbox.Folders(intFolderCount).Items.Count To 1 Step -1
            DoEvents
            Set objMail = objInbox.Folders(intFolderCount).Items.Item(intCount)
            intDateDiff = DateDiff("d", objMail.SentOn, Now)
            If intDateDiff > intAge Then
                blnFound = False
                For Each objFolder In objNamespace.Folders(CStr(Year(objMail.SentOn))).Folders(objInbox.Name).Folders
                    If objFolder.Name = objInbox.Folders(intFolderCount).Name Then
                        blnFound = True
                    End If
                Next
                If blnFound = False Then
                    objNamespace.Folders(CStr(Year(objMail.SentOn))).Folders(objInbox.Name).Folders.Add objInbox.Folders(intFolderCount).Name
                End If

                Debug.Print objInbox.Folders(intFolderCount).Name & ":" & objMail.SentOn & ":" & objMail.Subject
                ' folder structure i.e. "2010InboxsubFolder"
                Set objDestFolder = objNamespace.Folders(CStr(Year(objMail.SentOn))).Folders(objInbox.Name).Folders(objInbox.Folders(intFolderCount).Name)
                objMail.Move objDestFolder
                Set objDestFolder = Nothing
            End If
        Next intCount
    Next intFolderCount

    Debug.Print "Done"

End Sub
 
Enjoy

Article from MSN: “The Worst Interview Faux Pas” – Pisses me off

So I just read this article http://msn.careerbuilder.com/Article/MSN-2051-Interviewing-The-Worst-Interview-Faux-Pas since I have a few friends interviewing at different places and I was curious if it was worth forwarding out. For the most part it is a reasonable article but there are two very specific topics that really pissed me off when I read it.

Section 6: Poor Presentation, 3rd quote.

“I once had a recent graduate who looked fantastic on paper, but showed up wearing  flip-flops. During the interview, he would lean back in his chair, flex his hands over his head and he even said several curse words in his responses. It was so bad I e-mailed him afterwards to point out his most obvious blunders!” – Nickie Doria, marketing director for Emmer Development Corp.

Reading this quote actually made me think “Fuck You”.  Sure, I wore a suit to my interview for my current employer (whom I love and where I now wear flip-flops to work most days) to show respect but it probably wasn’t essential. They were hiring a specific talent, not a specific look. I am pretty sure I leaned back in my chair a bit since I was at ease and relaxed mostly. I avoided the F bomb or anything similar but even having that requirement is absurd. If you are hiring an adult, to do grown up things… language and attire should be no limitation. I will avoid my rant on curse words since I am strongly opinionated and could dedicate an entire post to that alone. The pretentious attitude that is conveyed in this quote really gets me fired up. So the gist of this one for me is… treat adults like adults, companies with restrictions and limitations so strict they are essentially treating their workforce like children strangle their talent  in my opinion. To the dude above that didn’t get the job… you didn’t really want to work there anyways (hah, like he will ever see my blog but whatever)

Section 8: Forgetting to clean up digital dirt, The entire section.

“Of course, for those who are MySpace and Facebook junkies, make sure your pages are set to the private setting. We actually had a girl apply for a leasing position with one of our companies, and she did very well during the interview. Later, the manager wanted to learn more about her, and found that her MySpace name was … well somewhat promiscuous at best! Needless to say, she never even got a call back! – Doria

Seriously, I want to slap this person. Who cares if she is a slut (what I get from the implication above)? That has nothing to do with her work. If she can close leases on properties fast enough to meet or beat quota then I don’t give a damn if she spends her weekend snorting coke off a bathroom urinal while getting double penetrated by Ron Jeremy and Peter North (to the people who instantly knew those names… you are sick, of course I referenced them so what does that say about me?). Someone’s personal life should not be a consideration in their employment. Sure, it can be a benefit for instance a digital designer who happens to have a large online gallery; but it should never detract. People who look at a facebook page and think oh noes, they have pictures playing beer pong… to them I say they are hypocrites. They do/did the same shit, they just don’t have the balls to take a picture of it and post it online for everyone to see the real them. Again, this one angers me because personal and work time are entirely different.

Sure, if there was a picture of them pissing in the coffee at work, that would be different… that directly affects them in a job related manner. However, if my picture is from a going away party for friend, where I happened to be chugging beer from a beer bong and couldn’t exactly stand up straight while doing it… well that shouldn’t matter. Tell me how doing that on a Friday night makes me less capable on Monday morning? If anything you should be worried about people who DO clean up their online digital presence, it means they believe they have something to hide and are willing to do so. Who do you want to hire… someone who believes they may be doing something wrong or unsavory but they are willing to simply hide it from you and attempt to live two separate lives essentially lying about their true nature OR someone who is open and honest with who and what they are and they embrace it?

Conclusion

The “conventional wisdom” relayed in the above statements really drives me nuts. We live in a free country but people’s personalities are so oppressed in the business culture (I will avoid another rant about this that could be another blog post). Companies that are growing, thriving, changing the world… I like to think they throw this “wisdom” out of the window and look at what the people they are interviewing can actually do while they are at work. Not how they look when they get to work, or what they do when they aren’t at work… neither of those matter. People who believe they do matter, are living in an age that has passed and will slowly die as they do.