<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[Grokking OpenStack]]></title>
  <link href="http://anteaya.info/atom.xml" rel="self"/>
  <link href="http://anteaya.info/"/>
  <updated>2013-03-29T13:45:15-04:00</updated>
  <id>http://anteaya.info/</id>
  <author>
    <name><![CDATA[Anita Kuno]]></name>
    <email><![CDATA[akuno@lavabit.com]]></email>
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[Suggestions for GNOME OPW Applicants]]></title>
    <link href="http://anteaya.info/blog/2013/03/29/suggestions-for-gnome-opw-applicants/"/>
    <updated>2013-03-29T11:33:00-04:00</updated>
    <id>http://anteaya.info/blog/2013/03/29/suggestions-for-gnome-opw-applicants</id>
    <content type="html"><![CDATA[<p>As my GNOME OPW internship comes to a close, I think about those who come after me. I hope that OpenStack continues to have places for GNOME OPW interns in the future. In support of that vision, I would like to offer some suggestions for GNOME OPW applicants to help you get the most out of your internship. Most of these suggestions I have employed myself and have been extremely happy with the results.</p>

<h3>Be Yourself</h3>

<p>As you go through the process of researching the different companies offering internships and selecting a company and mentor to apply to work with, be yourself. I think outloud and I ask a lot of questions, I need to find out early which people and companies like that approach and which feel that it is inappropriate for their goals. I need to attract those who encourage me to follow my comfortable working style and the best way for me to do that is to employ that working style and be myself. Yes there are some who won&#8217;t want to work with me. There will also be some who track me down and ensure I work with them. When I do find the people who I want to work with and who want to work with me, there will be no surprises for either of us, since I was upfront about how I work.</p>

<h3>Be Honest</h3>

<p>Be honest about your time commitments and about your experiences. Part of being honest is saying what you have accomplished. Yes, we all wish we knew more than we did, that is a driving motivation for wanting to work in a technical field. Be honest identifying what Open Source Applications you do use and have used in the past. Be honest about what you have built, what you have created, what you have researched and what you have supported. Don&#8217;t over-inflate what you have done but don&#8217;t pave over it either. Diminishing your accomplishments actually creates detrimental energy for all of us. So be honest, and state what you have done.</p>

<h3>Be Curious</h3>

<p>Ask questions. One of my best tools for learning is to identify myself as an intern. During my intership that was my standard line, &#8220;Hello I am an intern and I am just learning. I would like to know more about X. Do you have some time or can you suggest a direction for a newcomer to get more familiar with X?&#8221; People like interns, at least the people I choose to work with like interns. The title of intern, for me, indicates a willingness to learn. I use that as a way of introducing myself and have met a lot of really supportive people as a result. Sometimes if the person I am speaking with has time, they will ask me questions about the internship and about the GNOME OPW program. Frequently this has led to statements from the person I am talking to that they are glad that there are more women coming into the field. This does make me feel good. So ask questions, and find the company and the mentors that are happy to get a question from an intern.</p>

<h3>Communicate Your Status</h3>

<p>I used a number of tools to communicate my status. Irc and <a href="https://gist.github.com/">gists</a> are my favourite. <a href="https://gist.github.com/anteaya/afaf3047a28162ea3661">Here</a> is an early gist I composed as a combination whiteboard and note gatherer. I used the titles of the files to organize the output I copied from my terminal, the url to the bug report and some notes about what I tried and the obstacles I encountered. Putting my thoughts in a place that allows me to organize them and also share the url with my mentor or with others, really helped me to communicate my status on a regular basis so my mentor knew what I was doing.</p>

<h3>Find a Group that Welcomes You</h3>

<p>It doesn&#8217;t take much to say &#8220;Hello&#8221;. As you research the different companies offering internships join their irc channel and introduce yourself. I suggest something like, &#8220;Hello, I am considering applying to your company for an internship through GNOME OPW. I wanted to say Hello.&#8221; and then see what kind of response you get. Some people might not know what GNOME OPW is and may invite you to share a link to the GNOME OPW <a href="https://live.gnome.org/OutreachProgramForWomen">page</a> in which case you may have just started a conversation. Try a few different organizations. Find the one that suits you best. Personally I am really impressed with the organizations that have members that take the time to return a friendly &#8220;Hello&#8221;. Our OpenStack channel for mentor/intern conversation is irc.freenode.org #openstack-opw, please do drop by and say hello.</p>

<h3>Have a Goal</h3>

<p>Have a goal for yourself that is larger than the internship. It doesn&#8217;t matter what your goal is but having one helps you to have your own personal perspective on what the internship means to you. It can help you when you encounter obstacles (which you will) and guide you if you need to make a decision and possibly change direction during your internship. Have a goal and clearly state it to your potential mentor. Your mentor can help you achieve your personal goal, but only if they know about it.</p>

<h3>Meet As Many People As You Can</h3>

<p>Meet people in the GNOME OPW program, meet people in the organization you apply to and meet people in other organizations that have internships. During the early weeks of my internship I created an IRC channel (irc.freenode.org #openstack-opw) for mentors, interns and mentors-at-large (supportive folks who weren&#8217;t a direct mentor but offered lots of support and guidance to all of us as the program proceeded). As I met new people, I invited them into the channel including two mentors with GNOME OPW that don&#8217;t work with OpenStack. There are many ways to collaborate with people and with organizations. Encouraging communication between companies with a shared experience (GNOME OPW) can be really helpful for the larger goal of continuing to ensure there is a strong base of support for future interns.</p>

<h3>Complete the Patch Submission Requirement</h3>

<p>Your application will not be considered without it. Last round, 1/3 of applicants did not submit a patch thereby excluding themselves before they could even be considered. It is possible to submit a patch on short notice, but submit a patch. Your application won&#8217;t be considered without it.</p>

<h3>Have Fun</h3>

<p>There will be times of frustration and times of great pride. Allow yourself to experience both. Have fun while you work. Bring a sense of enjoyment with you and you will find others who do the same.</p>

<p>This concludes the points I wanted to convey to future internship applicants.</p>

<p>Since this is going to be one of my final posts as intern I need to do some acknowledging.</p>

<h3>Thank You!</h3>

<p>I would like to say a huge thank you to my mentor, <a href="http://www.icchasethi.com/">Iccha Sethi</a>. I will be the first to admit that I am not the easiest person to lead and Iccha worked with me all the way through the application process, getting me set up with a development environment and submitting my patches. She listened, heard what was important to me, worked with me when I fell down and celebrated my accomplishments with me. Thank you Iccha!</p>

<p>I am so glad I had peers working through my internship, and I am so glad they were <a href="http://ladquin.dreamwidth.org/">Laura Alves</a> and <a href="http://vmartinezdelacruz.com/">Victoria Martinez de la Cruz</a>. I appreciate your kindness, your determination and am proud of all you have achieved in your internship. I look forward to continue working with you both.</p>

<p>This program never would have come together if not for the hard work of <a href="http://justwriteclick.com/">Anne Gentle</a> and <a href="http://maffulli.net/">Stefano Maffulli</a> (otherwise known as reed), thanks so much for everything you have done for me both personally and as an intern with the GNOME OPW program.</p>

<p>Anne and <a href="http://www.jpichon.net/">Julie Pichon</a> were mentors in the program and I thank you for both your help and support. It has been truly wonderful to work with so many intelligent creative women. Thank you for all that you do.</p>

<p>Thank you <a href="https://live.gnome.org/MarinaZhurakhinskaya">Marina Zhurakhinskaya</a>. I am so glad you and Karen put so much energy into making this program work. It has been my pleasure to work with you.</p>

<p>I would also like to acknowledge some of the people who helped me along the way: markmc, russellb, pabelanger, jog0, bcwaldon, ewindisch, pleia2, flaper87, marktraceur, jfuerth, samanah, mordred, jeblair, fungi, clarkb, and zaro. Thank you so much for just being you, for helping when you could and providing support and guidance. I have enjoyed working with you all so much over the internship. Thank you.</p>

<p>Now for the good news. I get to keep working with you.</p>

<p>I have accepted at a position with a company allowing me to continue working on OpenStack. I plan to start with <a href="http://www.enovance.com/en">eNovance</a> next week. I am looking forward to my new job and am thrilled that it means I get to keep working with all of you on OpenStack.</p>

<p>Thank you so much for all of your support!<br/>
Anita Kuno</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Please rebase your change and upload a new patchset]]></title>
    <link href="http://anteaya.info/blog/2013/03/25/please-rebase-your-change-and-upload-a-new-patchset/"/>
    <updated>2013-03-25T09:41:00-04:00</updated>
    <id>http://anteaya.info/blog/2013/03/25/please-rebase-your-change-and-upload-a-new-patchset</id>
    <content type="html"><![CDATA[<p>From the time I created the topic branch until the time patchset #2 was approved and getting verified, the file <a href="https://review.openstack.org/#/c/24605/2">the patch</a> applied to had changed. I got the message from Jenkins to &#8220;Please rebase your change and upload a new patchset.&#8221;</p>

<p>I have been getting confident submitting patches, receiving reviews, editing my patches and resubmitting but having to rebase my patch and upload a new patchset was new for me.</p>

<p>I looked at some documentation, on our OpenStack <a href="https://wiki.openstack.org/wiki/Gerrit_Workflow">workflow</a> and also on <a href="https://www.kernel.org/pub/software/scm/git/docs/git-rebase.html">git rebase</a>. I decided to go with:
<code>git status</code> #I was on my clean topic branch<br/>
<code>git checkout master</code><br/>
<code>git pull</code><br/>
<code>git checkout my-topic-branch</code><br/>
<code>git rebase master</code></p>

<div><script src='https://gist.github.com/5237299.js?file='></script>
<noscript><pre><code></code></pre></noscript></div>


<p>This patch only dealt with one file, tools/pip-requires. I consulted with a collegue and was advised to use the following steps which worked:<br/>
<code>vi tools/pip-requires</code> #resolve the conflict in the file and save the changes<br/>
<code>git add tools/pip-requires &amp;&amp; git rebase --continue</code><br/>
This got me the following message, &#8220;Applying: Added PyRSS2Gen and python-swiftclient to pip-requires to satisfy the openstackwatch dependency.&#8221;<br/>
<code>git status</code> was clean<br/>
<code>git review</code> submitted the new patchset to gerrit.</p>

<p>An easy addition to the workflow but since it was the first time I had to do it I figured it was worth a quick post.</p>

<p>Thanks for supporting this GNOME OPW intern,<br/>
Anita Kuno.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Reviewing an OpenStack Patch]]></title>
    <link href="http://anteaya.info/blog/2013/03/21/reviewing-an-openstack-patch/"/>
    <updated>2013-03-21T09:35:00-04:00</updated>
    <id>http://anteaya.info/blog/2013/03/21/reviewing-an-openstack-patch</id>
    <content type="html"><![CDATA[<p>Every OpenStack contributor wants their patches reviewed and I am the same. Getting good feedback or an approval helps to achieve the mission the patch was created for in the first place, to add a feature or fix a bug. One of the best ways to get your patch reviewed is by reviewing patches submitted by others. People recognize the name of their patch reviewers and are appreciative. If people know you, your submitted patch might get their attention faster than if they don&#8217;t know you. Providing good reviews for patches also helps you to write good patches with concise patch titles and accurate descriptions, all part of a good patch.</p>

<p>Let&#8217;s take a look at a few points that might help you get started reviewing patches.</p>

<p>First of all, you will never know enough to totally feel confident before you begin reviewing patches, you just have to do it. If you are waiting to feel confident before you begin, you will never get the practice you need to feel confident.</p>

<p>Anyone who is signed in to <a href="http://review.openstack.org">review.openstack.org</a> can review a patch.</p>

<p>If you have received reviews in the past on your own patches, consider the most helpful comments you received and try to offer the same kind of support to the creator of patches you review. All of us are learning, and helpful review comments can really provide a lot of guidance for patch composers as they work to create an effective patch.</p>

<p>To get started, select a project in OpenStack that appeals to you. If you haven&#8217;t selected a project that you like yet, join irc.freenode.org and ask for some guidance in selecting a project to learn to review in either the #openstack-dev or #openstack-101 channels. (The #openstack-dev channel is for all contributors and the #openstack-101 channel is for new contributors.)</p>

<p>Then look for patches to that project on <a href="http://review.openstack.org">review.openstack.org</a> and read some of the prior reviews to patches. Look particularly for inline comments.</p>

<p>Here are some examples of inline comments to my patches that I found particularly helpful:<br/>
<a href="https://review.openstack.org/#/c/24598/1/modules/jeepyb/manifests/openstackwatch.pp">This inline comment</a> is a question. It provides a line of code for me to insert, with correct syntax, if I agree with the question as it is asked. This comment identifies the place in the code where the suggested code should be inserted, that is part of the usefulness of inline comments. Finding the right location in the existing code, for the code that I wish to submit, to be inserted is some of the most helpful feedback I can get.</p>

<p><a href="https://review.openstack.org/#/c/20708/1/novaclient/v1_1/shell.py">This inline comment</a> provides some feedback in the form of a short part of a stacktrace on the placement of my current code. It then follows up with a suggestion for a better place for my edit to be located. Getting a downvote is helpful, getting a downvote with guidance on how to achieve an upvote is the best kind of downvote.</p>

<p><a href="https://review.openstack.org/#/c/24404/">In this patch</a> I offered some comments on patch set #1 regarding some grammar in the commit message. It may seem like an inconsequential comment, but many contributors to OpenStack do not have English as a first language and a gently worded grammar suggestion is often appreciated. So in this case, my only contribution was some grammar suggestions but it was a contribution good enough for me to review the patch.</p>

<p>Finding nice small patches to review, <a href="https://review.openstack.org/#/c/22575/1/git-review.1">like this one</a>, can help you gain some confidence. There are still many patches that I just can&#8217;t begin to review, <a href="https://review.openstack.org/#/c/24273/">this one</a>, is an example. Also <a href="https://review.openstack.org/#/c/20452/">this one</a>. This patch is motivated from such a history in the code I haven&#8217;t had time to comprehend all that came before so I have no review to offer at this time.</p>

<p><a href="https://review.openstack.org/#/c/24846/1/manifests/site.pp">Here is a comment</a> I offered on a minor syntax correction. I used an inline comment to identify the line of code that needed editing, I explained the edit and offered a link to an example of code and then offered a correct code line for the patch composer to copy. These are the kinds of things that help me to improve my patches as I get them ready for approval, so it makes sense to me to offer them to others. Providing patch reviews like this may seem like a lot of work, but the feeling when I get reviews of this nature, with this much supportive detail in them, on my patches makes the work worthwhile.</p>

<p>Find small patches, offer what you can and identify what you are evaluating in the comments. Right now on some patches I can only offer an evaluation of syntax consistency so I state that in my comments.</p>

<p>I hope this post has been helpful to you and I encourage you to start doing some patch reviews if you haven&#8217;t already.</p>

<p>Thanks for supporting this GNOME OPW intern,<br/>
Anita Kuno.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Internship is 2/3 Complete - How Am I Doing?]]></title>
    <link href="http://anteaya.info/blog/2013/03/08/internship-is-2-slash-3-complete-how-am-i-doing/"/>
    <updated>2013-03-08T12:44:00-05:00</updated>
    <id>http://anteaya.info/blog/2013/03/08/internship-is-2-slash-3-complete-how-am-i-doing</id>
    <content type="html"><![CDATA[<p>I have finished two-thirds of my internship. Let&#8217;s take a look at what I can measure.</p>

<p>I have compiled the following stats on my OpenStack accomplishments to date:<br/>
blueprints - 1<br/>
merged patches - 13<br/>
abandoned patches - 3<br/>
patches in review - 2<br/>
bug reports filed - 3<br/>
bugs fixed - 4<br/>
bugs closed - 6<br/>
reviews - 20<br/>
launchpad karma - 309<br/>
blog - 18 posts<br/>
projects: 13 - OpenStack/Api-Site, OpenStack-CI, OpenStack-Infra/Config, OpenStack-Infra/Git-review, Openstack-Infra/Puppet-dashboard, Openstack-Infra/Jeepyb, Cinderclient, Glance, Glanceclient, Nova, Novaclient, Horizon, Oslo</p>

<p>Is this what I expected? I don&#8217;t know how to answer that question. I didn&#8217;t really have any kind of number for patched submitted or reviewed when I started the intership, so I guess all I can say is I don&#8217;t know what I expected.</p>

<p>I am happy with the number of projects/repos that I have contributed code to, since my overall goal for myself was to get as broad a picture as possible of the various projects and how they interrelate in the time allotted for the internship. I am happy to read the list of projects I learned enough about so that I could make an acceptable contribution.</p>

<p>I have been working with the Infra team the last few weeks and I have noted that my rate of bug fixing patches has gone down in that time but my rate of posting reviews has gone up and my rate of merged patches has stayed about the same. So Infra, for me, has a different workflow compared to the other project work I was doing. I find I am looking at bugs less and spending time on building functionality and contributing to reviews. This seems to fit the workflow and needs of the Infra team, so it is all good as far as I am concerned.</p>

<p>What else can I say I have learned and accomplished? I have a much deeper understanding of git then when I began my internship. I have more knowledge in this area than I have blogged about yet, since figuring out a way to convey that understanding with graphics and words takes some time. I also have a better understanding of the OpenStack release cycle now than I did before my internship, so now a lot of parts of the OpenStack workflow make more sense to me.</p>

<p>I have learned about puppet resources, started on salt, learned about how huge nova is and also seen firsthand the uniqueness of some of the various projects. I have not yet worked with the code for some projects, like swift for example, and only have a cursory understanding of its functionality from a lovely <a href="https://gist.github.com/anteaya/5017511">conversation</a> in #openstack-101.</p>

<p>Up until this point my focus has been very wide, looking to consume as much information as I could cram in during my intership. Now I think I need to re-focus and look to the connections I have already made, conclude the items I agreed to shepherd through the process and consolidate my time so that what I do now can serve as a useful bridge for what comes next. Hopefully what comes next for me is a long and mutually beneficial relationship with the OpenStack community.</p>

<p>Thanks so much for your continued patience and support.</p>

<p>Thanks for helping this GNOME OPW intern,<br/>
Anita Kuno.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[OpenStack Updated Individual Contributor License Agreements]]></title>
    <link href="http://anteaya.info/blog/2013/03/08/openstack-updated-individual-contributor-license-agreements/"/>
    <updated>2013-03-08T10:50:00-05:00</updated>
    <id>http://anteaya.info/blog/2013/03/08/openstack-updated-individual-contributor-license-agreements</id>
    <content type="html"><![CDATA[<p>Last weekend we updated the OpenStack Individual Contributor Liscense Agreement and all OpenStack contributors needed to sign a new individual agreement (those for which the individual agreement applies).</p>

<p>We graphed the data of the total number of signed forms for each time the total increased by one newly signed form.</p>

<p><img src="http://anteaya.info/media/images/cla_signups.png"></p>

<p>The time in epoch seconds has been converted to human readable format using UTC as a time zone.</p>

<p>As we looked at the data, fungi had the following to say:<br/>
&#8220;The rate is more linear than I anticipated&#8230; I was expecting it to level out faster than it is. At a glance, I can see that not many people signed over the weekend, that more signed on Monday than other days (possibly representing ~daily committers), but that the two-day and three-day committers seem to be in somewhat similar proportion. Also, the smoothness suggests that the contributor base are spread out across timezones fairly evenly, or at least their work patterns are spread out around the clock even if they are possibly less evenly distributed geographically.&#8221;</p>

<p>I couldn&#8217;t have said it better myself.</p>

<p>Thanks for supporting this GNOME OPW intern,<br/>
Anita Kuno.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[fatal: CLA (Echosign) contributor agreement is expired]]></title>
    <link href="http://anteaya.info/blog/2013/03/03/fatal-cla-echosign-contributor-agreement-is-expired/"/>
    <updated>2013-03-03T13:45:00-05:00</updated>
    <id>http://anteaya.info/blog/2013/03/03/fatal-cla-echosign-contributor-agreement-is-expired</id>
    <content type="html"><![CDATA[<p>The fix? Go <a href="https://review.openstack.org/#/settings/agreements">here</a> and sign the new contributor agreement.</p>

<p>You will also need to ensure you are a member of the <a href="https://www.openstack.org/join/register/">OpenStack Foundation</a>. Use the same email you used to sign up with Gerrit.</p>

<p>Multiple emails? Go <a href="https://review.openstack.org/#/settings/contact">here</a> and use your &#8216;Preferred Email&#8217; to sign up with the Foundation.</p>

<p>Already a Foundation member and got this message, &#8220;You may not be a member of the foundation registered under this email address&#8221;? Ensure your &#8216;Preferred Email&#8217; listed in your Gerrit settings is also listed as the primary email address in your <a href="https://www.openstack.org/profile/">Foundation profile</a>.</p>

<p>Attempted to submit a patch for review and got this message, &#8220;fatal: ICLA contributor agreement requires current contact information&#8221;? Go to <a href="https://review.openstack.org/#/settings/contact">this page</a> and ensure one of Mailing Address, Country, Phone Number or Fax Number has a value.</p>

<p><a href="http://lists.openstack.org/pipermail/openstack-dev/2013-March/006173.html">Why is the contribtor agreement expired?</a></p>

<p>Still not working? irc.freenode.net #openstack-infra</p>

<p>Thanks,<br/>
Anita Kuno.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[The Structure and Habits of Git]]></title>
    <link href="http://anteaya.info/blog/2013/02/26/the-structure-and-habits-of-git/"/>
    <updated>2013-02-26T11:30:00-05:00</updated>
    <id>http://anteaya.info/blog/2013/02/26/the-structure-and-habits-of-git</id>
    <content type="html"><![CDATA[<h3>Git Init</h3>

<p><img src="http://anteaya.info/media/images/git/git_init.png"></p>

<div><script src='https://gist.github.com/5039992.js?file='></script>
<noscript><pre><code></code></pre></noscript></div>


<p>I learned upon inspection that the following files contained either text or scripts supportive of git but not directly required for this exercise so I deleted them to streamline the visuals.</p>

<p>I removed:<br/>
<code>.git/hooks</code><br/>
<code>.git/info</code><br/>
<code>.git/description</code></p>

<p>This left me with the following directory structure:</p>

<div><script src='https://gist.github.com/5040039.js?file='></script>
<noscript><pre><code></code></pre></noscript></div>


<p>Creating a file does not change the git directory. Adding a file does.</p>

<h3>Git Add</h3>

<p><img src="http://anteaya.info/media/images/git/git_add.png"></p>

<div><script src='https://gist.github.com/5040083.js?file='></script>
<noscript><pre><code></code></pre></noscript></div>


<p>So after the first file is staged, the file <code>.git/index</code> is created. Also the directory <code>.git/objects/44</code> is created and has a file named with a hash. But there is no log yet.</p>

<h3>Git Commit</h3>

<p><img src="http://anteaya.info/media/images/git/git_commit.png"></p>

<div><script src='https://gist.github.com/5041709.js?file='></script>
<noscript><pre><code></code></pre></noscript></div>


<p>The file <code>COMMITEDIT_MSG</code> is created, containing the first edit message. Two more objects are created, each with a directory and file.</p>

<p><img src="http://anteaya.info/media/images/git/git_commit_with_head.png"></p>

<p>The logs directory is created with the file HEAD containing
the information for the commit: the parent, the current id, user.name, creation time
and the status.
The logs directory also has the path refs/heads leading to file master,
which contains the same information as .git/logs/HEAD
There is also a new file, master, in .git/refs/heads the content of which
is the hash pointing to the initial commit.
So right now, of the files I can read, what is pointing to the commit?<br/>
<code>.git/refs/heads/master</code><br/>
<code>.git/logs/HEAD</code><br/>
<code>.git/logs/refs/heads/master</code><br/>
The file .git/index might be pointing to the initial commit as well,
I don&#8217;t know because I can&#8217;t read it.</p>

<div><script src='https://gist.github.com/5041761.js?file='></script>
<noscript><pre><code></code></pre></noscript></div>


<h3>Git Checkout -b Topic</h3>

<p><img src="http://anteaya.info/media/images/git/git_checkout_b_topic.png"></p>

<div><script src='https://gist.github.com/5041821.js?file='></script>
<noscript><pre><code></code></pre></noscript></div>


<p>No new objects are created when a new branch is created. Two new files are created, one under <code>.git/refs/heads/name_of_branch</code>, in this case, feature, and one under <code>.git/logs/refs/heads/name_of_branch</code>.</p>

<p>Both files contain the hash of the initial commit, the file under the logs directory also contains the hash of the the parent commit, id of the current commit, user.name of the branch creator as well as the time of creation for the branch, and the type of action it is, in this case: <code>branch: Created from HEAD</code>.</p>

<div><script src='https://gist.github.com/5041937.js?file='></script>
<noscript><pre><code></code></pre></noscript></div>


<h3>Git Add</h3>

<p><img src="http://anteaya.info/media/images/git/git_add2.png"></p>

<div><script src='https://gist.github.com/5041896.js?file='></script>
<noscript><pre><code></code></pre></noscript></div>


<p>The only thing that is created when a file is added to staging is an object, with its directory and file.</p>

<h3>Git Commit</h3>

<p><img src="http://anteaya.info/media/images/git/git_commit2.png"></p>

<div><script src='https://gist.github.com/5041969.js?file='></script>
<noscript><pre><code></code></pre></noscript></div>


<p>So two new objects were created, they each have a directory and a file.</p>

<div><script src='https://gist.github.com/5041995.js?file='></script>
<noscript><pre><code></code></pre></noscript></div>


<p>The <code>git log</code> command shows me the log for the branch I am in, in this case the topic branch named &#8216;feature&#8217;.</p>

<div><script src='https://gist.github.com/5042005.js?file='></script>
<noscript><pre><code></code></pre></noscript></div>


<h3>Git Checkout Master</h3>

<p><img src="http://anteaya.info/media/images/git/git_checkout_master.png"></p>

<div><script src='https://gist.github.com/5042016.js?file='></script>
<noscript><pre><code></code></pre></noscript></div>


<h3>Git Add</h3>

<p><img src="http://anteaya.info/media/images/git/git_add3.png"></p>

<div><script src='https://gist.github.com/5042034.js?file='></script>
<noscript><pre><code></code></pre></noscript></div>


<h3>Git Commit</h3>

<p><img src="http://anteaya.info/media/images/git/git_commit3.png"></p>

<div><script src='https://gist.github.com/5042049.js?file='></script>
<noscript><pre><code></code></pre></noscript></div>


<p>I now have 9 objects.</p>

<div><script src='https://gist.github.com/5042074.js?file='></script>
<noscript><pre><code></code></pre></noscript></div>


<p>The <code>git log</code> command shows me the log for the branch I am in at the time of running the command.</p>

<div><script src='https://gist.github.com/5042084.js?file='></script>
<noscript><pre><code></code></pre></noscript></div>


<h3>Git Merge</h3>

<p><img src="http://anteaya.info/media/images/git/git_merge.png"></p>

<p>Make sure you know where you are with <code>git status</code> prior to merging!</p>

<div><script src='https://gist.github.com/5042100.js?file='></script>
<noscript><pre><code></code></pre></noscript></div>


<p>Two objects got created, and a new file
called <code>.git/ORIG_HEAD</code>.</p>

<div><script src='https://gist.github.com/5042130.js?file='></script>
<noscript><pre><code></code></pre></noscript></div>


<p>After the merge, executing <code>git log</code> from the master branch shows all my commits made in both the master branch and the merged topic branch named feature in the chronological order in which they were created.</p>

<div><script src='https://gist.github.com/5042136.js?file='></script>
<noscript><pre><code></code></pre></noscript></div>


<p>I hope you get something useful from this post.</p>

<p>Thank you for supporting this GNOME OPW intern,<br/>
Anita Kuno.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[OpenStack Release Cycle - n00b's Eyeview]]></title>
    <link href="http://anteaya.info/blog/2013/02/20/openstack-release-cycle-n00bs-eyeview/"/>
    <updated>2013-02-20T15:53:00-05:00</updated>
    <id>http://anteaya.info/blog/2013/02/20/openstack-release-cycle-n00bs-eyeview</id>
    <content type="html"><![CDATA[<p><img src="http://anteaya.info/media/images/release_cycle.png"></p>

<p>We are at that moment in the release cycle where knowing at least a little bit about the <a href="https://wiki.openstack.org/wiki/Release_Cycle">release cycle</a> is in order. I do better when I have an image or symbol to work with so I created the above graphic.</p>

<p>I went with the image of a nautilus shell for two reasons. One, it is pretty and I like it as a visual and two, it is an interesting symbol of a process that is continually growing and expanding but also has to house the nautilus and keep it safe while constant construction is occurring.</p>

<p>The main spiral represents the master branch of the code, the red arrow indicating the direction of its progress based upon the path it has traveled until that point. The curved intermediate walls (called sutures, I believe) represent the release-branches. The release of Grizzly is coming up in April and is represented above by the green wall/release-branch. Prior to Grizzly was Folsom, in blue, and Essex, in orange.</p>

<p>We just went through code freeze and I do believe breaking off the master branch to create the first release candidate is imminent. After the release candidate is broken off, pushing patches for bug fixes gets interesting.</p>

<p>When in doubt of how to submit patches with gerrit, contact the project leader for the project in question. My basic understanding is that the bugs submitted against the release candidate need the patch applied first to the master branch and the backported to the milestone-proposed branch. Again, talk to the project lead to ensure you are using the correct gerrit commands for the patch to apply to the correct branch: master or milestone-proposed.</p>

<p>I will be working my way through this process for the first time, so this post might go through an edit or two as my understanding matures.</p>

<p>Thanks for supporting this GNOME OPW intern,<br/>
Anita Kuno.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Testing]]></title>
    <link href="http://anteaya.info/blog/2013/02/07/testing/"/>
    <updated>2013-02-07T18:21:00-05:00</updated>
    <id>http://anteaya.info/blog/2013/02/07/testing</id>
    <content type="html"><![CDATA[<p>When I first started developing with my <a href="http://devstack.org/">Devstack</a> installation I was told to use <code>./run_tests.sh</code> to run the test suite and that was good enough for me. Then I began to see some other commands to run tests, <code>tox -epy27</code>, <code>tox -epep8</code> and I ran the commands but didn&#8217;t fully understand why some commands are better than others.</p>

<p>Then I had to run some tests in /opt/stack/nova and every command I ran failed. Why? I didn&#8217;t know. But now I do.</p>

<p>Recently there has been a move in the repos to testr from nosetests. I got caught in this and have learned a bit about how to dig myself out of this hole.</p>

<p>First of all I am running Ubuntu 12.04 and when I first installed the OS I also installed: <code>apt-get install git libxml2-dev libxslt1-dev</code> and after installing devstack I installed tox with <code>pip install tox</code>. I also had python 2.7 on my machine and wanted to install 2.6 for testing which I did with <code>apt-get install python-software-properties</code>, <code>add-apt-repository ppa:j5-dev/python2.6</code>, <code>apt-get update</code>, <code>apt-get install python2.6 python2.6-dev</code>. I also learned I needed the mysql development libraries which I got with <code>apt-get install mysql-client libmysqlclient-dev</code>.</p>

<p>So I followed my current workflow upon cd&#8217;ing into a new directory: <code>git status</code>, <code>git pull</code>, <code>rm -rf .venv</code>, <code>sudo python setup.py install</code>. Then I tried both <code>./run_tests.sh</code> which failed and <code>tox</code> which failed.</p>

<p>I found out that the &#8220;Error: pg_config executable not found.&#8221; in my output was due to missing the <code>libpq-dev</code> in Ubuntu (rhel is <code>postgresql-devel</code>).</p>

<p>I also learned that this error output &#8220;Please install a more recent version first, using &#8216;easy_install -U distribute&#8217;.&#8221; suggesting that running <code>easy_install -U distribute</code> might solve the problem didn&#8217;t for me. Distribute is bundled by virtualenv which is used by tox. The solution? Upgrade tox with <code>pip install tox --upgrade</code>.</p>

<p>Also when running <code>tox</code> if I got an error &#8220;invalid command &#8216;testr&#8217;&#8221; I learned that <code>tox -r</code> will create an updated test environment using testr and the tests passed for me. So if I run <code>tox -r</code> I don&#8217;t need to remove the virtual environment with <code>rm -rf .venv</code> since the -r flag to tox will rebuild venv from stratch.</p>

<p>So right now my workflow is to run tests with <code>tox</code> which runs tests against python 2.6 and 2.7 (since I have both installed) and pep8 or <code>tox -epy26</code> for just testing against python 2.6, <code>tox -epy27</code> for testing just against python 2.7 and <code>tox -epep8</code> for just running the pep8 tests. If you are inclined, taking a peek into tox.ini will show you the configuration for the different environments. Some tox environments are not run by default but can be helpful for debugging and cleanup, an example would be pyflakes.</p>

<p>I hope this information is helpful to you.</p>

<p>Thanks for supporting this GNOME OPW intern,<br/>
Anita Kuno.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Current Status]]></title>
    <link href="http://anteaya.info/blog/2013/01/30/current-status/"/>
    <updated>2013-01-30T17:14:00-05:00</updated>
    <id>http://anteaya.info/blog/2013/01/30/current-status</id>
    <content type="html"><![CDATA[<p>Yesterday marked the end of my first 4 weeks as an intern working on OpenStack. I have merged code for 1 feature and 2 bug fixes. I also wrote code that I abandoned which was necessary to close a bug. It may not sound like much but I am pretty happy with what I have accomplished.</p>

<p>I would like to thank my mentor, <a href="http://www.icchasethi.com/">Iccha Sethi</a>, for helping me so much by requiring my status updates, helping me set deadlines, encouraging me to reach out to others and challenging me to learn new skills. Thank you, Iccha. I also want to thank the other interns <a href="http://ladquin.dreamwidth.org/">Laura Alves</a> and <a href="http://vmartinezdelacruz.com/">Victoria Martínez de la Cruz</a> for being so wonderful to work with and so supportive as I learn these new skills. Laura&#8217;s mentor <a href="http://justwriteclick.com/">Anne Gentle</a> and Vicky&#8217;s mentor <a href="http://www.jpichon.net/">Julie Pichon</a> are wonderfully helpful to all of us, thank you to them. We also have some mentors-at-large in the form of <a href="http://blogs.gnome.org/markmc/">Mark McLoughlin</a>, <a href="http://russellbryantnet.wordpress.com/">Russell Bryant</a> and <a href="http://bcwaldon.cc/">Brian Waldon</a>, thank you to you. We all learn so much every time you explain the nuance of a situation, which we couldn&#8217;t get from a manual.</p>

<p>If you, as reader of this blog post, feel like joining in supporting our learning, you too are welcome to join us in #openstack-opw on the freenode server.</p>

<p>Thanks for supporting this GNOME OPW intern,<br/>
Anita Kuno.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Logging &amp; Debugging]]></title>
    <link href="http://anteaya.info/blog/2013/01/30/logging-and-debugging/"/>
    <updated>2013-01-30T13:24:00-05:00</updated>
    <id>http://anteaya.info/blog/2013/01/30/logging-and-debugging</id>
    <content type="html"><![CDATA[<p>I addressed my first foray into debugging, setting it up using the python console, in this <a href="http://anteaya.info/blog/2013/01/16/who-are-you-and-what-are-you-going-to-do/">post</a>.</p>

<p>For some reason, when I turned to debugging one day I couldn&#8217;t get it to work and I couldn&#8217;t figure out why (I will explain the solution at the conclusion of this post). Fortunately I had a great guide in the form of <a href="http://russellbryantnet.wordpress.com/">russellb</a> who likes to use logging and just happened to be willing to make a bit of time for me. What follows is what I learned about logging.</p>

<h3>Logging</h3>

<p>Logging is useful to see the status of something either as it is running or after it has run. If you are using Devstack (as I am) you already have access to continual logging of processes via the screen tool. When Devstack installs it sets up a window for each process, so executing a variation of <code>screen -r stack</code> gets you in to view the process logs as each process runs and updates the log. (Remember to exit screen with <code>Ctrl+a d</code> to detach the shell from screen while leaving screen running.) Now I am learning to parse these logs slowly but the point is they exist, which I needed pointed out to me so I am glad I know now.</p>

<p>Next is setting up logging to provide output for a local process I am working on understanding and addressing. The simplest example involves adding <code>import logging</code> to the top of the file, creating an instance of logging with <code>LOG = logging.getLogger(__name__)</code> outside of any of the classes and then an individual log statement inside the class and function you wish to explore <code>LOG.debug('class.function was called")</code>.</p>

<p>Examples are gold to me, so lets work with this as a series of incremental examples.</p>

<p>First the bare minimum to get some logging working:</p>

<div><script src='https://gist.github.com/4676393.js?file='></script>
<noscript><pre><code>import logging

logging.basicConfig()

LOG = logging.getLogger(__name__)

def foo():
    LOG.critical(&quot;foo was called&quot;)
    print &quot;Hello World!&quot;

foo()</code></pre></noscript></div>


<p>If this were the contents of a file entitled logging_example_01.py, you could expect the following output:</p>

<div><script src='https://gist.github.com/4677018.js?file='></script>
<noscript><pre><code>$ python logging_example_01.py 
CRITICAL:__main__:foo was called
Hello World!</code></pre></noscript></div>


<p>Let&#8217;s see what other kind of logging statements are available.</p>

<div><script src='https://gist.github.com/4676629.js?file='></script>
<noscript><pre><code>import logging

logging.basicConfig()

LOG = logging.getLogger(__name__)

def foo():
    LOG.critical(&quot;foo was called&quot;)
    LOG.debug(&quot;this message output from debug&quot;)
    LOG.warning(&quot;this is a warning message&quot;)
    LOG.info(&quot;this is some information, hope it is helpful&quot;)
    LOG.error(&quot;this is an error&quot;)
    print &quot;Hello World!&quot;

foo()</code></pre></noscript></div>


<p>Here is the expected output:</p>

<div><script src='https://gist.github.com/4676646.js?file='></script>
<noscript><pre><code>$ python logging_example_02.py 
CRITICAL:__main__:foo was called
WARNING:__main__:this is a warning message
ERROR:__main__:this is an error
Hello World!</code></pre></noscript></div>


<p>As you can see, critical, warning and error logging messages were output and debug and info messages were skipped.</p>

<p>How do we get the debug and info messages output? We have to change the logging level.</p>

<p>By passing level=logging.INFO as an argument to basicConfig() we set the logging level to INFO.</p>

<div><script src='https://gist.github.com/4676696.js?file='></script>
<noscript><pre><code>import logging

logging.basicConfig(level=logging.INFO)

LOG = logging.getLogger(__name__)

def foo():
    LOG.critical(&quot;foo was called&quot;)
    LOG.debug(&quot;this message output from debug&quot;)
    LOG.warning(&quot;this is a warning message&quot;)
    LOG.info(&quot;this is some information, hope it is helpful&quot;)
    LOG.error(&quot;this is an error&quot;)
    print &quot;Hello World!&quot;

foo()</code></pre></noscript></div>




<div><script src='https://gist.github.com/4676723.js?file='></script>
<noscript><pre><code>$ python logging_example_03.py 
CRITICAL:__main__:foo was called
WARNING:__main__:this is a warning message
INFO:__main__:this is some information, hope it is helpful
ERROR:__main__:this is an error
Hello World!
</code></pre></noscript></div>


<p>Alas, our debug message still is not output. We change the logging level once again, this time to DEBUG.</p>

<div><script src='https://gist.github.com/4676747.js?file='></script>
<noscript><pre><code>import logging

logging.basicConfig(level=logging.DEBUG)

LOG = logging.getLogger(__name__)

def foo():
    LOG.critical(&quot;foo was called&quot;)
    LOG.debug(&quot;this message output from debug&quot;)
    LOG.warning(&quot;this is a warning message&quot;)
    LOG.info(&quot;this is some information, hope it is helpful&quot;)
    LOG.error(&quot;this is an error&quot;)
    print &quot;Hello World!&quot;

foo()</code></pre></noscript></div>


<p>Now we see all of our logging messages:</p>

<div><script src='https://gist.github.com/4676756.js?file='></script>
<noscript><pre><code>$ python logging_example_04.py 
CRITICAL:__main__:foo was called
DEBUG:__main__:this message output from debug
WARNING:__main__:this is a warning message
INFO:__main__:this is some information, hope it is helpful
ERROR:__main__:this is an error
Hello World!</code></pre></noscript></div>


<p>We are ready to put this knowledge to use in an OpenStack project file.</p>

<p>I was working with glanceclient Image.delete so let&#8217;s look at putting logging in that file. With the imported files add a line with <code>import logging</code>. Below the constants SORT_DIR_VALUES and SORT_KEY_VALUES add <code>LOG = logging.getLogger(__name__)</code>. We don&#8217;t need the <code>logging.basicConfig()</code> line of code since this is taken care of for us elsewhere. This is the set up, finally the execution with the logging statement. Within the Image class inside the delete() function add <code>LOG.debug('ImageManager.delete was called')</code>.</p>

<p>After I make these edits and save the file I have to reinstall the client with <code>sudo python setup.py install</code> otherwise my edits will not take effect. Then I can run <code>glance --debug image-delete &lt;image_id&gt;</code> and my log message will be output, amongst the rest of the debugging information.</p>

<p>This is what I understand about logging so far, and it is very helpful to have this as a tool.</p>

<h3>Debugging</h3>

<p>The only code I need for debugging is <code>import pdb</code> set at the top of the file with the other imports (alphabetically) and <code>pdb.set_trace()</code> wherever I want the trace to start. But here is the key, which I didn&#8217;t know until I was learning logging with russellb, after I edit the file to include the import and set_trace() I have to reinstall the client with <code>sudo python setup.py install</code> otherwise no debugging happens. Also after I remove the debugging code I must again reinstall the client to have my working code reflect the code in the files.</p>

<p>If you reached the end, I thank you. <a href="http://www.flickr.com/photos/joz3/7640538734/lightbox/">Here is a cat picture for you to enjoy.</a></p>

<p>Thanks for supporting this GNOME OPW intern,<br/>
Anita Kuno.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Reboot The Shell]]></title>
    <link href="http://anteaya.info/blog/2013/01/30/reboot-the-shell/"/>
    <updated>2013-01-30T12:10:00-05:00</updated>
    <id>http://anteaya.info/blog/2013/01/30/reboot-the-shell</id>
    <content type="html"><![CDATA[<p>Why would I need to reboot the shell when working on code in any of the projects? Well, if I edit any of the shell scripts (shell.py) the changes won&#8217;t be picked up by my shell unless I reboot it somehow.</p>

<p>My first inclination was to find a command for OpenStack along the lines of <code>source ~/.bashrc</code> but there was no command I could find.</p>

<p>It wasn&#8217;t until I pulled from a git repo that had moved to testtools that I recognized that <code>sudo python setup.py install</code>, executed within the root directory of the project, rebooted the shell to update the version of shell.py that it was sourcing.</p>

<p>I don&#8217;t know if this is the only way to reboot the shell when working on changes to shell.py, but so far it seems to be an effective way.</p>

<p>Since I got caught this week moving back to the master branch with a clean git status but with stale responses to shell help, I now incorporate <code>sudo python setup.py install</code> as part of my workflow. I already executed <code>git status</code> and <code>./run_tests.sh</code> everywhere I went and I just throw in <code>sudo python setup.py install</code> if ever I have less than full confidence that the shell responses are reflective of the shell.py code in the repo in which I am located.</p>

<p>Thanks for supporting this GNOME OPW intern,<br/>
Anita Kuno.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[How I Am Visualizing python-novaclient]]></title>
    <link href="http://anteaya.info/blog/2013/01/24/how-i-am-visualizing-python-novaclient/"/>
    <updated>2013-01-24T16:49:00-05:00</updated>
    <id>http://anteaya.info/blog/2013/01/24/how-i-am-visualizing-python-novaclient</id>
    <content type="html"><![CDATA[<p><img src="http://anteaya.info/media/images/python-novaclient.png"></p>

<p>Why am I visualizing novaclient this way? Well since I am just getting my bearings regarding the code the first thing I need to do is look for landmarks. It was really confusing seeing python-novaclient/novaclient in the path at first and seeing nova/nova in the nova project really threw me at first but I am starting to understand the purpose behind the file structure.</p>

<p>My big landmarks are the directories: python-novalclient, novaclient and openstack or v1. The openstack directory is at the same level as v1 (directly underneath novaclient) and the common directory is underneath the openstack directory, so why have I visualized it this way? Well for the sake of simplicity I like to visualize one path of flow and functionally v1 is imported by files within common and openstack so I consider openstack-common to be one entity and for it to be above the code flow of v1. The v1 stands for version 1 and in the projects with a second version of code to interact with the API, the directory is called v2. When novaclient has a v2 directory it will be at the same level in my mental model as v1, so a fork.</p>

<p>I cherry picked file names to place in this graphic. Why, because there are so many of them. At a certain point it becomes too much data to see the pattern and I mostly wanted to illustrate the mental pattern I am working with right now. I picked the files I have spent the most time in so far.</p>

<p>This graphic might seem simplistic or silly but it took me about 2 weeks to adopt this mental picture and another week to be able to communicate it. Not directly contributing to code but knowing where to look is a very valuable skill. I feel in some regards I am learning how to narrow down my search when looking for the location of a specific function.</p>

<p>Thank you for supporting this GNOME OPW intern,<br/>
Anita Kuno.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Stepping through authenticate()]]></title>
    <link href="http://anteaya.info/blog/2013/01/16/stepping-through-authenticate/"/>
    <updated>2013-01-16T13:18:00-05:00</updated>
    <id>http://anteaya.info/blog/2013/01/16/stepping-through-authenticate</id>
    <content type="html"><![CDATA[<p>Armed with the investigative abilities of the debugger, I now can do a little spelunking.</p>

<p>While playing with the debugger set-up in my previous post, I saw that it took me through authenticate() in a rather tidy fashion so I thought I would spend a little time here.</p>

<p>I won&#8217;t walk through the entire function, just the first part. We will be looking at the consequences of stepping through parts of the code below. This is from novaclient/client.py:</p>

<div><script src='https://gist.github.com/4549374.js?file='></script>
<noscript><pre><code>301     def authenticate(self):
302         if has_keyring:
303             keys = [self.auth_url, self.projectid, self.user, self.region_name,
304                     self.endpoint_type, self.service_type, self.service_name,
305                     self.volume_service_name]
306             for index, key in enumerate(keys):
307                 if key is None:
308                     keys[index] = '?'
309             keyring_key = &quot;/&quot;.join(keys)
310             if self.os_cache and not self.used_keyring:
311                 # Lookup the token/mgmt url from the keyring first time
312                 # through.
313                 # If we come through again, it's because the old token
314                 # was rejected.
315                 try:
316                     block = keyring.get_password(&quot;novaclient_auth&quot;,
317                                                  keyring_key)
318                     if block:
319                         self.used_keyring = True
320                         self.auth_token, self.management_url = block.split('|')
321                         return
322                 except Exception:
323                     pass
324 
325         magic_tuple = urlparse.urlsplit(self.auth_url)</code></pre></noscript></div>


<p>With the help of the debugger I will be looking at the values of the various arguments and variables both before and after they are defined, and in the case of key and index as their value changes.</p>

<p>So the debugger heads into authenticate(). Before the first line (#301) is executed, I check the values of self and self.authenticate().</p>

<div><script src='https://gist.github.com/4549840.js?file='></script>
<noscript><pre><code>--Call--

self == &lt;novaclient.client.HTTPClient object at 0x1f39450&gt;
self.authenticate() == None

def authenticate(self):</code></pre></noscript></div>


<p>Then I check the value of has_keyring: before line #302 runs.</p>

<div><script src='https://gist.github.com/4549864.js?file='></script>
<noscript><pre><code>has_keyring == True

    if has_keyring:</code></pre></noscript></div>


<p>Lines #303 - #305 take a list of values and assigns them to the variable keys. I check the value of keys, which I learn is undefined before the code runs (makes sense) and also the individual values of all the attributes in the list.</p>

<div><script src='https://gist.github.com/4549920.js?file='></script>
<noscript><pre><code>'keys' is not defined
self.auth_url == http://50.56.25.223:5000/v2.0
self.project.id == admin
self.user == admin
self.region_name == None
self.endpoint_type == publicURL
self.service_type == compute
self.service_name == None
self.volume_service_name == None

        keys = [self.auth_url, self.projectid, self.user, self.region_name, 
                self.endpoint_type, self.service_type, self.service_name, 
                self.volume_service_name]</code></pre></noscript></div>


<p>After lines #303 - #305 have run, I check the value of keys.</p>

<div><script src='https://gist.github.com/4549945.js?file='></script>
<noscript><pre><code>keys == ['http://50.56.25.223:5000/v2.0', 'admin', 'admin', None, 'publicURL', 'compute', None, None]</code></pre></noscript></div>


<p>Next we move into lines #306 and #307 which run in a loop 4 times before breaking out to execute line #308. I check the value of key and index during the process. These variables begin as undefined and then their value changes as the code runs through the for loop.</p>

<div><script src='https://gist.github.com/4550073.js?file='></script>
<noscript><pre><code>'key' is not defined; 'index' is not defined
                                                
        for index, key in enumerate(keys):      #key == http://50.56.25.223:5000/v2.0; index == 0
            if key is None:

        for index, key in enumerate(keys):      #key == admin; index == 1
            if key is None:

        for index, key in enumerate(keys):      #key == admin; index == 2
            if key is None: 

        for index, key in enumerate(keys):      #key == None; index == 3
            if key is None: 
                                                #keys[index] == None
                keys[index] = '?'               #keys[index] == ?</code></pre></noscript></div>


<p>Then back into lines #306 and #307 3 more times before breaking out to execute line #308.</p>

<div><script src='https://gist.github.com/4550160.js?file='></script>
<noscript><pre><code>        for index, key in enumerate(keys):      #key == publicURL; index == 4
            if key is None:

        for index, key in enumerate(keys):      #key == compute; index == 5
            if key is None:

        for index, key in enumerate(keys):      #key == None; index == 6
            if key is None:
                                                #keys[index] == None
                keys[index] = '?'               #keys[index] == ?</code></pre></noscript></div>


<p>Then we loop through lines #306 - #308 one last time.</p>

<div><script src='https://gist.github.com/4550192.js?file='></script>
<noscript><pre><code>        for index, key in enumerate(keys):      #key == None; index == 7
            if key is None:
                                                #keys[index] == None
                keys[index] = '?'               #keys[index] == ?</code></pre></noscript></div>


<p>We go back up to line #306 but we have enumerated over every element in the list, so then we execute lines #309 and #310, checking the values of the variables as we go.</p>

<div><script src='https://gist.github.com/4550256.js?file='></script>
<noscript><pre><code>        for index, key in enumerate(keys):

'keyring_key' is not defined
keys == ['http://50.56.25.223:5000/v2.0', 'admin', 'admin', '?', 'publicURL', 'compute', '?', '?']

        keyring_key = &quot;/&quot;.join(keys)

keyring_key == http://50.56.25.223:5000/v2.0/admin/admin/?/publicURL/compute/?/?
self.os_cache == False
self.used_keyring == False

        if self.os_cache and not self.used_keyring:</code></pre></noscript></div>


<p>We have come to the last line of code in this examination, line #325. We check the values before it is executed and after execution it takes us into the function urlsplit() in the python library urlparse.py.</p>

<div><script src='https://gist.github.com/4550308.js?file='></script>
<noscript><pre><code>'magic_tuple' is not defined
self.auth_url == http://50.56.25.223:5000/v2.0
self == &lt;novaclient.client.HTTPClient object at 0x1f39450&gt;

    magic_tuple = urlparse.urlsplit(self.auth_url)</code></pre></noscript></div>


<p>I hope that stepping through the authenticate function with me has been useful for you. I learned a lot creating this post. For learning a code base, I feel that using a debugger can be a very powerful tool.</p>

<p>We didn&#8217;t go through the entire authenticate function, but the part that we did takes the various attributes of the HTTPClient object and creates a url to be parsed. I found the investigation rather fun.</p>

<p>Thanks for supporting this GNOME OPW intern,<br/>
Anita Kuno.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Who Are You and What Are You Going To Do?]]></title>
    <link href="http://anteaya.info/blog/2013/01/16/who-are-you-and-what-are-you-going-to-do/"/>
    <updated>2013-01-16T10:53:00-05:00</updated>
    <id>http://anteaya.info/blog/2013/01/16/who-are-you-and-what-are-you-going-to-do</id>
    <content type="html"><![CDATA[<p>This is the post in which I discuss how I set up a debugger to work for me with OpenStack, at least in the development environment. I like to be able to ask the code what object it is using, what the type of object is and what are the attributes. I always feel better when I can dialog directly with the code, no one knows better what is happening, and I dislike guessing since I am usually wrong. Better to ask, I find.</p>

<p>The first thing I had to do was select a debugger. I went with <a href="http://docs.python.org/2/library/pdb.html">pdb</a>, the python debugger that comes with python, simply because it was the easiest. I knew I needed to get the debugger working with OpenStack and I felt that the integration step would be my trickiest part so I elected for the simplest version of a debugger I could find and it appears that my decision to go with pdb was the right decision for me.</p>

<p>Then I had to learn how to use the debugger in a vanilla set-up. Since I didn&#8217;t know how the python debugger worked before I began, I spent some time with a few tutorial blog posts and am glad that I did. First I went <a href="http://pythonconquerstheuniverse.wordpress.com/2009/09/10/debugging-in-python/">here</a> to go through the debugging A B C&#8217;s. I found it to be an easy tutorial and a great introduction. This tutorial showed me how to drop into the debugger by calling both the debugger and a file name from the command line.</p>

<p>I knew I wanted to access the debugger from the console so <a href="http://www.doughellmann.com/PyMOTW/pdb/">this</a> was a great next tutorial. It creates a class in a file and then calls an instance of the class from the console with pdb.run(). It also calls the debugger after an exception with pdb.pm(). I liked the look of pdb.pm() since it could be invoked after an error or exception but every time I tried it, regardless of the pdb command I used, the debugger exited rather than stepping through the code. Initially I thought it was due to a mistake I made, but after further investigation I now believe that this seems to be the intended action of pdb.pm() though I have no idea why.</p>

<p>So while the second tutorial was helpful to show me that using the debugger from the console/interpreter was possible, I didn&#8217;t have the exact syntax I needed for my situation. Next I worked with <a href="http://onlamp.com/pub/a/python/2005/09/01/debugger.html">this</a> tutorial, rather long but for my purposes it gave me what I needed. The first part was the most helpful for me, I found the code for the last exercise - the advanced portion - didn&#8217;t match the output the tutorial displayed. I tried to locate the author but was unsuccessful.</p>

<p>So I decided to go with pdb import at the top of the file I wanted to start to step through and pdb.set_trace() at the location in the code where I wanted to drop into the debugger. Look at line #7 and line #43 in the code below. Line #44 was the beginning of the code I edited, which I wanted to evaluate, so I placed pdb.set_trace() on the line prior.</p>

<div><script src='https://gist.github.com/4548946.js?file='></script>
<noscript><pre><code>  1 # Copyright 2010 Jacob Kaplan-Moss
  2 &quot;&quot;&quot;
  3 Image interface.
  4 &quot;&quot;&quot;
  5 
  6 import uuid
  7 import pdb
  8 
  9 from novaclient import base
 10 from novaclient import exceptions
 11 
 12 from novaclient.openstack.common import uuidutils
 13 
 14 class Image(base.Resource):
 15 #file truncated for the purposes of this example
...
 35                                                         
 36     def get(self, image):
 37         &quot;&quot;&quot;
 38         Get an image.
 39 
 40         :param image: The ID of the image to get.
 41         :rtype: :class:`Image`
 42         &quot;&quot;&quot;
 43         pdb.set_trace()                                 #here is the pdb.set_trace()
 44         if uuidutils.is_uuid_like(image):               #this is the section I edited
 45             return self._get(&quot;/images/%s&quot; % base.getid(image), &quot;image&quot;)
 46         else:
 47             raise exceptions.CommandError(&quot;You must use the image id with get(). You passed '%s'.&quot; % (image))</code></pre></noscript></div>


<p>Next I needed to create an instance of novaclient in the python console. So I opened a console in my OpenStack development environment, imported the class for the client and created an instance.<br/>
<code>python</code><br/>
<code>import novaclient.v1_1.client</code><br/>
<code>client = novaclient.v1_1.client.Client('admin', '&lt;admin_password&gt;', 'admin', 'http://50.56.25.223:5000/v2.0')</code>
Your ip will be different than mine but :5000/v2.0 should work for you, that is until it changes. So check the date on this blog post.</p>

<p>Then I requested the client fetch me an image by passing in the id of an existing image, which I had gotten with <code>nova image-list</code> earlier.<br/>
<code>client.images.get('9e44f0ee-083d-40a4-804c-534d66fb15ac')</code></p>

<p>Now without pdb.set_trace() in the images.py code, the output to <code>client.images.get(image id)</code> is something like this:<br/>
<code>&lt;Image: cirros-0.3.0-x86_64-uec&gt;</code></p>

<p>But with pdb.set_trace() in the images.py file, I got:</p>

<div><script src='https://gist.github.com/4549157.js?file='></script>
<noscript><pre><code>&gt; /opt/stack/python-novaclient/novaclient/v1_1/images.py(44)get()
-&gt; if uuidutils.is_uuid_like(image):
(Pdb)</code></pre></noscript></div>


<p>&#8230; and I&#8217;m in the debugger. Which was my goal.</p>

<p>Thanks for supporting this GNOME OPW intern,<br/>
Anita Kuno.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Status Updates]]></title>
    <link href="http://anteaya.info/blog/2013/01/08/status-updates/"/>
    <updated>2013-01-08T15:38:00-05:00</updated>
    <id>http://anteaya.info/blog/2013/01/08/status-updates</id>
    <content type="html"><![CDATA[<p>One of the things that I am doing that seems to be working very well for me, is constantly posting my current status: to my mentor, in my notes, for my reference, just to clear my thoughts.</p>

<p>I find that posting my status is my way of inviting comment without depending upon it. If my mentor has questions about what I am doing or how I am progressing, hopefully my status updates can help her keep tabs on me. If she has any thing to offer, a new direction, a suggestion, some support, she can post in response to an update. By continually posting my status without being asked, I allow her to check in as she has time, without having to wait for her to ask. It gives me the responsibility of scheduling my time productively and selecting tasks I can do on my own while incorporating feedback as it arrives.</p>

<p>It is serving a good secondary purpose. It is helping me to track when I am stuck and when I am not. If I am able to articulate my status, I probably am making productive use of my time. If I can&#8217;t answer the question &#8220;What are you doing?&#8221; with anything other than the response &#8220;foundering&#8221; it is probably time to seek some guidance.</p>

<p>The one caveat that I would add is the 3 day rule, in any new undertaking or situation I give myself 3 days to just be in the environment, with permission to not know anything and just listen and read and search and look and get my bearings. After 3 days, something just happens and some things which were completely unstructured just fall into place.</p>

<p>So I find that volunteering and posting my status, continually throughout the day for my mentor, contributes to a good work flow between us.</p>

<p>Thanks for supporting this GNOME OPW intern,<br/>
Anita Kuno.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Setting Up Devstack]]></title>
    <link href="http://anteaya.info/blog/2013/01/08/setting-up-devstack/"/>
    <updated>2013-01-08T14:44:00-05:00</updated>
    <id>http://anteaya.info/blog/2013/01/08/setting-up-devstack</id>
    <content type="html"><![CDATA[<p>With any kind of development, the first step is creating your environment.</p>

<p>The Devstack project sets up an OpenStack development environment rather quickly (the downloads take a while) with one script. <a href="http://devstack.org/">Devstack</a>.</p>

<p>Devstack has been tested on both Ubuntu Server 12.04 and Fedora 17. I have tried it on both and am most familiar with Ubuntu Server so that is the environment I will address going forward. The only thing I have noticed with Fedora is the necessity to disable selinux after the OS is installed.</p>

<p>So install Ubuntu Server 12.04 as an openssh server. Once installation is finished and you have rebooted and signed in, I like to execute the following: <code>sudo apt-get install git libxml2-dev libxslt1-dev eatmydata lynx irssi vim-gtk</code>. The two libs are necessary to run some of the OpenStack module tests and aren&#8217;t installed with Devstack. Git is required for Devstack to install properly, eatmydata is useful when running the OpenStack tests. I like to have lynx and irssi around in case I need them. Vim-gtk has a few more features than the default Ubuntu vim so I grab that too.</p>

<p>After apt-get is finished, I generate some keys and then configure my git: <code>git config -- global user.editor "Vim"</code>, and also <code>user.name "My Name"</code>, and <code>user.email "Must Match Email in Gerrit"</code>.</p>

<p>Then I get Devstack: <code>git clone git://github.com/openstack-dev/devstack.git</code> and then <code>cd devstack</code>; <code>cp samples/localrc .</code>; <code>vi localrc</code> and add the following lines to localrc:<br/>
FLOATING_RANGE=192.168.1.224/27<br/>
FIXED_RANGE=10.0.0.0/24<br/>
FIXED_NETWORK_SIZE=256<br/>
FLAT_INTERFACE=eth0<br/>
then close localrc and run <code>./stack.sh</code>. <a href="http://devstack.org/guides/single-machine.html">Full Guide Here</a></p>

<p>Usually Devstack installs successfully but the last couple of installations have exited with non-specific failure messages although everything seems to be running.</p>

<p>After Devstack is finished, execute <code>source ~/devstack/openrc</code>.</p>

<p>I test my installation by executing <code>nova image-list</code>, if I get a list of images I am usually in good shape.</p>

<p>The other thing I do is execute <code>screen -r stack</code> and see if all 17 processes have windows. Less then 17 processes and I may have to stop devstack with <code>./unstack.sh</code> and restart with <code>./stack.sh</code>. Detach screen with <code>Ctrl-a d</code> since you want screen to continue running.</p>

<p>This is basically the format I follow to install Devstack on Ubuntu Server 12.04.</p>

<p>Thanks for supporting this GNOME OPW intern,<br/>
Anita Kuno.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Taking Note]]></title>
    <link href="http://anteaya.info/blog/2013/01/08/taking-note/"/>
    <updated>2013-01-08T13:06:00-05:00</updated>
    <id>http://anteaya.info/blog/2013/01/08/taking-note</id>
    <content type="html"><![CDATA[<p>One of the biggest challenges that I am experiencing right now is understanding how to describe what I am experiencing. Writing down notes and developing my own workflow is feeling like a process that needs to evolve as my internship proceeds.</p>

<p>At the moment, I am working with IRC as my main form of communication and I have a private dialog window open with my mentor during my workdays. At the conclusion of every workday I copy the text of our interactions and save it to a <a href="http://projects.gnome.org/tomboy/">Tomboy</a> note. Tomboy notes are very flexible and I really like that I can search all of my notes from the main Tomboy page. Iccha, my mentor, often tells me commands or file paths in IRC that are helpful. Being able to search my notes for that command again or access a conversation or url from the day previous is really quite easy. Using a private dialog in IRC and and saving the text to Tomboy notes is working well for me.</p>

<p>I have a google document shared with my mentor and myself and I try to keep it updated as often as I can. I try for once or twice a day. It is a good place for summaries, ideas that carry over from day to day and urls for extra reading. It is nice because the viewers of the document can be administered and I can access the document easily from my browser.</p>

<p>I have been using a blank text file as a whiteboard in my local environment as a place to write pseudo code and collect my thoughts. Yesterday I expanded that idea to this <a href="https://gist.github.com/afaf3047a28162ea3661">gist</a>. I like that the gist is private within github but I can also share the url with whomever I would like to access the information, readers of this blog for instance. I am still getting the hang of using comments on bug reports to communicate so I created this gist to explain my work and my thought processes to the creator of the bug and get his input going forward. Since it gives an up-to-date status of my understanding, after creating it, my mental energy was free to move onto other things, like blogging while waiting to communicate with the originator of the bug report. I like to have my mental work in tidy packages so that I can view a new and separate task with my full attention. Creating this gist as a whiteboard really served that purpose for me.</p>

<p>Taking notes will evolve as I go along and I am glad to learn new methods to make the best use of how I like to organize my mental space.</p>

<p>Thanks for supporting this GNOME OPW intern,<br/>
Anita Kuno.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Working Together]]></title>
    <link href="http://anteaya.info/blog/2012/11/27/working-together/"/>
    <updated>2012-11-27T11:55:00-05:00</updated>
    <id>http://anteaya.info/blog/2012/11/27/working-together</id>
    <content type="html"><![CDATA[<p>A strong part of the open source community is working with others. I have had the good fortune to be in a position to work closely with another applicant over the last week.</p>

<p>Shruti (<a href="http://simpsonographism.blogspot.in/?view=classic">who blogs here</a>) lives in India and is currently a student. She found out about the GNOME Outreach Program for Women through her love of OpenStack (via Facebook) and had contacted the same mentor as myself, Iccha. <a href="http://www.icchasethi.com">Iccha</a> introduced us via email and we have been working together as a team since that introduction.</p>

<p>It was funny the way it worked out, we met each other the day prior to American Thanksgiving, which Iccha being in the US celebrates and neither Shruti or I do (I&#8217;m in Canada). So there we were, neither Shruti or I really knowing what we were doing, trying to get devstack working. Off to IRC we go.</p>

<p>I had previously met <a href="http://www.jpichon.net/">jpich</a> on IRC and introduced her and Shruti. We had a lively interaction understanding various error messages and reading documentation trying to get operational environments on our respective systems.</p>

<p>Now had Shruti or I approached a different mentor or had Iccha not introduced us, I may have spent my time flailing away by myself waiting for Iccha to resurface after her holidays. By introducing us to each other and leaving us to figure it out on our own, we filled in the gaps ourselves and continued to work away, asking questions, having doubts, making mistakes, reading documentation and having success. Success is nicer when you have someone to share it with.</p>

<p>I&#8217;m not sure if this is quite the way the GNOME Outreach Program for Women is supposed to work, but this is how it is working for us. We have a daily email thread where Shruti and I share with Iccha our initial topic for the day with intended next steps. This allows for feedback and suggestions from the other two. When one of us is unavailable perhaps the other can offer something supportive if only an ascii smile.</p>

<p>We have good conversations with other OpenStack mentors and OpenStackers not involved in the program at all. Turns out they are genuinely nice even if they don&#8217;t know we are applicants.</p>

<p>I also think we encourage each other. Having another applicant to work with is a better gauge of accomplishment than comparing ones work with the mentor. I think it heartens me to work with another applicant and I am glad it is Shruti. She is friendly and intelligent and a hard worker.</p>

<p>I really like the energy we have created between and amongst us during the application process and I hope we can continue to grow and expand it during the execution of the program.</p>

<p>Thanks for reading,<br/>
Anita Kuno.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[My First Commit]]></title>
    <link href="http://anteaya.info/blog/2012/11/27/my-first-commit/"/>
    <updated>2012-11-27T11:15:00-05:00</updated>
    <id>http://anteaya.info/blog/2012/11/27/my-first-commit</id>
    <content type="html"><![CDATA[<p>It may not sound like much, but having a successful first commit makes me feel very proud. The commit? It was a bug fix. The bug? It was a typo. Silly, yeah, I know but the point is less the code and more the process. It is a process which I had attempted and failed at previously.</p>

<p>About a year ago, I wandered into the Mozilla channel and received a lot of support when I identified myself as someone wanting to learn how to contribute. I had at least two people in the channel giving me their full attention and support. And yet I failed. I wasn&#8217;t able to navigate the process and I couldn&#8217;t put any more energy into trying. Life intervened and the necessity to feed dependants and take care of daily activities eliminated the brief burst of energy I had. I never made it back into the Mozilla channel after that first visit.</p>

<p>I am a big open source software consumer and I love to make useful contributions to products I believe are worthy. It wasn&#8217;t for lack of desire on my part or lack of welcome on the behalf of those in the Mozilla channel. It was all the other stuff that had to be dealt with to get to the point of committing a patch.</p>

<p>So what is different now? How was I able to commit a patch to OpenStack when I couldn&#8217;t figure it out with Mozilla? Well there are a couple differences, let me discuss them.</p>

<p>Money. Yeah, I don&#8217;t want to be crass, but money makes a difference. The GNOME Outreach Program for Women provides a stipend which when I devote my 40 hours per week to the project, I can buy groceries. I don&#8217;t have to do the work and figure out to buy groceries, I can focus on the work knowing I can also eat at the same time. Might sound not worth discussing to some, but to me it is a mainstay in any kind of learning/internship/apprenticeship program in which I have participated and I have participated in a few. So money isn&#8217;t the reason but it does make a contribution possible, for me at least.</p>

<p>Identified mentors available via IRC, email and Google Hangout (I think other venues are possible but these are the ones suggested and implemented thus far). Also the mentors checked in with me. Iccha knew I was considering applying and followed up with me, asking me questions about what I would like, offering me links and information, setting up times to meet with me. So for the brief time I was sitting on the fence, a mentor knew my status and helped me to make up my mind. That too counts for a lot.</p>

<p>The duration of the interaction also helps, I didn&#8217;t need to get everything done in one day. Many of the projects require specialized environments for executing and testing code and these environments don&#8217;t get installed by a n00b in one sitting. Having someone come to me and purposefully decide to help me as I tried and made mistakes and reinstalled and tried again made the difference for me to persist through multiple failures to ensure that I had an environment to edit code and successfully submit a patch.</p>

<p>Open source software is all about code but it also has a very large framework consisting of individuals who have a very specific way of working. By working together over several days, certainly at least a week if not two, I am starting to learn the people and the process. The edit itself took less than 5 seconds. Setting up the environment and learning the culture in order to enable me to edit the code and submit the patch with confidence? At least a week. Creating an environment filled with great people allowing me to take the week I needed is the difference between this successful commit and my prior failed attempt.</p>

<p>Thanks for reading,<br/>
Anita Kuno.</p>
]]></content>
  </entry>
  
</feed>
