Showing posts with label sysadmin. Show all posts
Showing posts with label sysadmin. Show all posts

Wednesday, May 25, 2016

Asking Bad Questions

There are no stupid questions but there bad ones, IMHO. 

Someone who shall remain nameless, just asked me some bad questions about Saltstack. I hope by sharing this I can help you guys out as you’re learning about Saltstack in particular, or another tool like git or systems administration/devops in general or really anything.

He started off politely which is good.

**********: (13:11)
Hey Charles, gotta minute for Salt question?
Charles Baker: (13:11)
Shoot
**********: (13:13)
first - do you know if the salt modules for "parted" and "extfs" are installed?
Second - can you tell me how to run a module command locally?
I tried "salt-call parted.partition.list /dev/xvdb" but get module "parted" not available.

The above is only okay. He did tell me exactly what he tried in the 2nd question. But he had already made an assumption about the root cause in question 1st. BTW, these are not the worst questions I've ever received, but they pushed me over the edge.

Charles Baker: (13:13)
What environment are you in?
********** (13:14)
Staging

Above is a bad question on my part, I started to buy into his idea that there was something wrong with the Saltstack masters. I should have started with the next question, as I looked at the documentation myself to be sure I understood what was wrong, if anything.

Charles Baker: (13:15)
Did you look at the documentation for the parted module?
**********: (13:16)
yes - it's not very helpful to me.doesn't say how to run that from a minion, just a master.Also, i'm still not certain the module is installed on the master
Charles Baker: (13:16)

The above question isn’t really his fault. I don’t think anyone in Cloud Operations at my current gig has had Saltstack training except me and I had that on my previous job. But it does show a fundamental lack of understanding about Saltstack. I think it’s kinda’ unfair to expect that everyone can pick up a complex tool like Saltstack and learn it on their own. However, the question is good in that he admitted that the documentation wasn’t helpful to him.

**********: (13:16)
i guess i could try to install the module on the minion, but don't knkow how to do that either

The above is not good troubleshooting technique. It’s “try something, even something I don’t know how to do, and hope it solves my problem."

Charles Baker: (13:17)
Try to run the command with the proper syntax first
Charles Baker: (13:17)
The command syntax from the master is nearly the same as for salt-call
Charles Baker: (13:18)
Except you don’t have to specify a target, ‘*’, for example
**********: (13:18)
[root@******** ~]# salt-call parted.partition.list /dev/xvdb
Module 'parted' is not available.

He repeats the same command, obviously not having paid attention to command line example I linked to above.

Charles Baker: (13:19)
Look at the documentation
Charles Baker: (13:19)
you’re not calling it correctly
**********: (13:20)
ah - it is trying to be smart.should just use partition.list, not parted.partition.list
Charles Baker: (13:20)
Yes, exactly like it is in the document
**********: (13:21)
Tx

And here is what the proper syntax and execution looks like.

[ec2-user@******* ~]$ sudo salt-call partition.list /dev/xvda1
[INFO    ] Executing command 'parted -m -s /dev/xvda1 print' in directory '/root'
local:
    ----------
    info:
        ----------
        disk:
            /dev/xvda1
        interface:
            unknown
        logical sector:
            512
        model:
            Unknown
        partition table:
            loop
        physical sector:
            512
        size:
            32.2GB
    partitions:
        ----------
        1:
            ----------
            end:
                32.2GB
            file system:
            flags:
            number:
                1
            size:
                32.2GB
            start:
                0.00B
            type:
                ext4
[ec2-user@******** ~]$


Be willing to be vulnerable. Admit that you don’t know something rather than assuming something is wrong with the tool. Ask clear, precise questions. For example:

Got a minute?I tried the following command and it didn’t work as I expected it to work (provide output or a screenshot). I also looked at the documentation but I’m not sure I understand it. The example commands seem to be illustrating what you do on the Saltstack master and not on a minion with salt-call. Can you help me understand what is going wrong?

One of my best recommendations is to read the old, long and somewhat pedantic but still relevant "How To Ask Questions The Smart Way". Another good read is "How To Become A Hacker". 

Thursday, March 20, 2014

Essential DevOps References

Just a quick list of some books that I think are essential to putting your mind in the DevOps way of thinking. No particular order. I'll add some other references soon. Like podcasts, websites, etc.
If you force me to pick three to start with I would read: The Phoenix Project,  Lean Start Up and The Year Without Pants. In that order. They are not technology specific. However, they will change the way you think about IT work.

Tuesday, January 21, 2014

Prasara Yoga Recovery 20140121

After a mostly sedentary day waiting for my wife while she had an out patient medical procedure and then working from my couch while she slept off the effects of general anesthesia I got in a low intensity workout. Today's workout consisted of 52 minutes of walking for 2.5 miles and 13.5 minutes of Prasara Yoga as outlined in a recovery routine in the Bodyweight Blueprint for Fat Loss.

I was a little sore this morning. Not as sore as yesterday, but I could still feel soreness primarily in my torso and core from all angles. My triceps are sore too. I need to find a way to give more direct stimulation to my biceps.

The walk was cold. It was still in the forties when I set out but it was windy. As far as the yoga I had the most difficulty with the trinity squats and the tripod reach-unders in this routine. Also, the first forward fold with hands clasped behind my back is really hard. My shoulders are just so tight that I can hardly raise my arms off my back.

I feel reenergized after getting my heart rate up and stretching out. I hope I can bring that energy level down enough to go to sleep relatively early. I don't want to be up all night as I've got to get my moderate intensity workout in tomorrow. BTW, today was Day 22, the  2nd day in the sixth cycle of the first phase of this workout program.

Sunday, October 20, 2013

Tired of Starting Over Then DO NOT QUIT

So, I haven't worked out again for seventeen days, not since I tweaked my back working out when I was in Atlanta for DevOpsDays. I've seen the slogan which is the title of this post on Facebook, Twitter, Google+ and elsewhere on the internet. I need to make it my motto. I keep beginning workout plans and stopping, beginning to eat more healthily and stopping. I've got to get in a groove and stay in it.

Fellow sysadmin and online acquaintance @magurski inspired me with his weight loss tweet:

lost 2.4 lbs since his last weigh-in! Magurski's lost 61.8 lbs so far. #myfitnesspal - Michael A. Gurski (@magurski) October 19, 2013
My wife and sons left a couple of hours ago to ride their bikes on the Swamp Rabbit Trail. I still don't have a bike and my hip has still been bothering me so I decided not to go along. I could have rented a bike, but again you wouldn't believe how uncomfortable riding a bike with an irritated hip socket can be.

Therefore I took a page out of another of my online, Steve the Diabetes Warrior, acquaintance's play books and got my workout in outdoors, barefoot and shirtless. Again, I did a light, brief routine to get myself back in the groove hopefully without hurting anything or making myself too sore.

  1. Two-legged Glute Activation Raises 1 x 15
  2. Flying Dogs 1 x 15 per side, alternating
  3. Kettlebell Swings
    • Point A 5 x 12.5 lb. t-bar homemade kettlebell
    • Point B 5 x 12.5 lb. t-bar homemade kettlebell
    • Swings 5 x 12.5 lb. t-bar homemade kettlebell
    • Swings 30, 30 x 17.5 lb t-bar homemade kettlebell
  4. Turkish Get Ups
    • Strong ( right ) Side x 5 x 5 lb. dumbbell
    • Weak ( left ) Side x 5 x 5 lb. dumbbell
    • Strong ( right ) Side x 5 x 5 lb. dumbbell
    • Weak ( left ) Side x 5 x 5 lb. dumbbell
  5. Myotatic Crunch 1x5
  6. Cat Vomit Exercise 5 reps
I finished this routine in thirty-two minutes. I focused on keeping my core tight during the kettlebell swings so as not to repeat the back tweaking, injury. I need to slow down on the myotatic crunches and hold at the top position for a few seconds. The TGUs really had my heart pounding and my lungs working like a bellows. Rising from a supine position to standing and then returning to a supine position repeatedly can be quite a workout even with a light weight. Next workout on Tuesday. 

Tuesday, October 15, 2013

Subtle Breakage in Saucy Salamander

All of a sudden, after what have become daily dist-upgrades on my part as the release of Ubuntu Saucy Salamander approaches, my VPN connection stopped working. I try to connect to VPN and get an error "no valid secrets". Also, I couldn't edit the VPN connection. Some googling lead me to "gray button for saving “editing VPN connection” in Ubuntu 12.04"  It didn't exactly match my situation, I'm running 13.10 already, but it was close enough for me to figure out what to try. I made the following change:

[chbaker@reacher:polkit-1/actions]$ diff -u ORIGorg.freedesktop.NetworkManager.policyORIG org.freedesktop.NetworkManager.policy
--- ORIGorg.freedesktop.NetworkManager.policyORIG 2013-10-07 05:57:03.000000000 -0400
+++ org.freedesktop.NetworkManager.policy 2013-10-15 16:50:56.724445415 -0400
@@ -86,7 +86,7 @@
     <message xml:lang="uk">Правила системи забороняють вмикання або вимикання з’єднань з мережею на системному рівні</message>
     <message xml:lang="zh_CN">系统策略阻止启用或禁用系统网络</message>
     <defaults>
-      <allow_inactive>no</allow_inactive>
+      <allow_inactive>auth_admin</allow_inactive>
       <allow_active>yes</allow_active>
     </defaults>
   </action>
@@ -940,4 +940,4 @@
     </defaults>
   </action>
 
-</policyconfig>
\ No newline at end of file
+</policyconfig>
[chbaker@reacher:polkit-1/actions]$
After logging out and back in my VPN connection works again. I think there are other mis-configurations in Saucy Salamander (13.10), too. For example the date and time are no longer being displayed in my taskbar. Also, when I go to the time date settings all the clock options are grayed out and I can't edit them. This is really quite disappointing since 13.10 is slated for release in just two days. I can live w/o the date and time in my task bar, but no way I can work remotely without VPN.
 

No Progress Yesterday

I didn't do anything toward my website building goal yesterday, Friday 04 March 2022. I'll pick it up again today.