Updating Solaris 11

It used to be the case that you could happily update your OpenSolaris install for free.

Now, with Oracle Solaris you need to get a key and certificate as part of you support subscription to get the updates from Oracle.

Here’s a very brief overview of what you’ll need to do.

This is how your publisher is setup by default:

jim@solaris11:~$ pkg publisher
 PUBLISHER                             TYPE     STATUS   URI
 solaris                               origin   online   http://pkg.oracle.com/solaris/release/

You’ll need to update your publisher like this :

jim@solaris11:~$ pfexec pkg set-publisher -k Oracle_Solaris_11_Support.key.pem -c Oracle_Solaris_11_Support.certificate.pem -g https://pkg.oracle.com/solaris/support -G http://pkg.oracle.com/solaris/release/ solaris

jim@solaris11:~$ pkg publisher
 PUBLISHER                             TYPE     STATUS   URI
 solaris                               origin   online   https://pkg.oracle.com/solaris/support/

( I’m assuming you’ve already got a support subscription, and downloaded your key and certificate…)

Now you’ve done that, you can list which updates are available. In this case, we want to update the “entire” package which represents the whole OS:

jim@solaris11:~$ pkg list -af entire
 NAME (PUBLISHER)                                  VERSION                    IFO
 entire                                            0.5.11-0.175.0.9.0.5.0     ---
 entire                                            0.5.11-0.175.0.8.0.5.0     ---
 entire                                            0.5.11-0.175.0.7.0.5.0     ---
 entire                                            0.5.11-0.175.0.6.0.6.0     ---
 entire                                            0.5.11-0.175.0.5.0.5.0     ---
 entire                                            0.5.11-0.175.0.5.0.4.0     ---
 entire                                            0.5.11-0.175.0.4.0.6.0     ---
 entire                                            0.5.11-0.175.0.4.0.5.0     ---
 entire                                            0.5.11-0.175.0.3.0.4.0     ---
 entire                                            0.5.11-0.175.0.2.0.4.0     ---
 entire                                            0.5.11-0.175.0.2.0.3.0     ---
 entire                                            0.5.11-0.175.0.2.0.3.0     ---
 entire                                            0.5.11-0.175.0.1.0.5.0     ---
 entire                                            0.5.11-0.175.0.1.0.4.0     ---
 entire                                            0.5.11-0.175.0.0.0.2.0     i--
 entire                                            0.5.11-0.151.0.1.14        ---
 entire                                            0.5.11-0.151.0.1.13        ---
 entire                                            0.5.11-0.151.0.1.12        ---
 entire                                            0.5.11-0.151.0.1.11        ---
 entire                                            0.5.11-0.151.0.1.10        ---
 entire                                            0.5.11-0.151.0.1.9         ---
 entire                                            0.5.11-0.151.0.1.8         ---
 entire                                            0.5.11-0.151.0.1.7         ---
 entire                                            0.5.11-0.151.0.1.6         ---
 entire                                            0.5.11-0.151.0.1.5         ---
 entire                                            0.5.11-0.151.0.1.4         ---
 entire                                            0.5.11-0.151.0.1.3         ---
 entire                                            0.5.11-0.151.0.1.2         ---
 entire                                            0.5.11-0.151.0.1.2         ---
 entire                                            0.5.11-0.151.0.1.1         ---
 entire                                            0.5.11-0.151.0.1           ---

There is a better explanation of the entire package here:

jim@solaris11:~$ pkg info entire
 Name: entire
 Summary: Incorporation to lock all system packages to the same build
 Description: This package constrains system package versions to the same
 build.  WARNING: Proper system update and correct package
 selection depend on the presence of this incorporation.
 Removing this package will result in an unsupported system.
 Category: Meta Packages/Incorporations
 State: Installed
 Publisher: solaris
 Version: 0.5.11
 Build Release: 5.11
 Branch: 0.175.0.0.0.2.0
 Packaging Date: October 20, 2011 02:38:22 PM
 Size: 5.45 kB
 FMRI: pkg://solaris/entire@0.5.11,5.11-0.175.0.0.0.2.0:20111020T143822Z

Before you update that package, you’ll notice that you currently have a single Boot Environment (BE):

jim@solaris11:~$ beadm list
BE      Active Mountpoint Space Policy Created          
--      ------ ---------- ----- ------ -------          
solaris NR     /          4.26G static 2012-07-28 15:12

When you do update the package, a new BE will be made for you. Making a new BE means that changes aren’t made to the original; if the install goes badly, then all you need to do is boot back into the original again.

Following that, you can simply go ahead and update the package with one command! :

jim@solaris11:~$ pfexec pkg update entire@0.5.11-0.175.0.9.0.5.0
           Packages to install:   2
            Packages to update: 243
           Mediators to change:   1
       Create boot environment: Yes
Create backup boot environment:  No

DOWNLOAD                                  PKGS       FILES    XFER (MB)
Completed                              245/245   8410/8410  237.6/237.6

PHASE                                        ACTIONS
Removal Phase                              2240/2240 
Install Phase                              2541/2541 
Update Phase                               9778/9778 

PHASE                                          ITEMS
Package State Update Phase                   488/488 
Package Cache Update Phase                   243/243 
Image State Update Phase                         2/2 

A clone of solaris exists and has been updated and activated.
On the next boot the Boot Environment solaris-1 will be
mounted on '/'.  Reboot when ready to switch to this updated BE.

So now you can run /usr/sbin/beadm and see both BEs:

jim@solaris11:~$ beadm list
BE        Active Mountpoint Space Policy Created          
--        ------ ---------- ----- ------ -------          
solaris   N      /          5.34M static 2012-07-28 15:12 
solaris-1 R      -          5.70G static 2012-07-29 16:01

Decent questions, decent answers

Garbage In Garbage Out (GIGO ).  We all know that if we don’t form clear and well described questions, its not really possible to get useful answers back without first clarifying what was meant by the one that asked. With this in mind, people in the IT industry often get frustrated with poorly asked questions and are vocal about it too.

Sometimes, we find that just asking the question to ourselves outloud can produce a sensible answer. I was reading an interesting post today which offered this amusing dialogue about that scenario…It goes like this :

 

Bob pointed into a corner of the office. “Over there,” he said, “is a duck. I want you to ask that duck your question.”

I looked at the duck. It was, in fact, stuffed, and very dead. Even if it had not been dead, it probably would not have been a good source of design information. I looked at Bob. Bob was dead serious. He was also my superior, and I wanted to keep my job.

I awkwardly went to stand next to the duck and bent my head, as if in prayer, to commune with this duck. “What,” Bob demanded, “are you doing?”

“I’m asking my question of the duck,” I said.

One of Bob’s superintendents was in his office. He was grinning like a bastard around his toothpick. “Andy,” he said, “I don’t want you to pray to the duck. I want you to ask the duck your question.”

I licked my lips. “Out loud?” I said.

“Out loud,” Bob said firmly.

I cleared my throat. “Duck,” I began.

“Its name is Bob Junior,” Bob’s superintendent supplied. I shot him a dirty look.

“Duck,” I continued, “I want to know, when you use a clevis hanger, what keeps the sprinkler pipe from jumping out of the clevis when the head discharges, causing the pipe to…”

In the middle of asking the duck my question, the answer hit me. The clevis hanger is suspended from the structure above by a length of all-thread rod. If the pipe-fitter cuts the all-thread rod such that it butts up against the top of the pipe, it essentially will hold the pipe in the hanger and keep it from bucking.

I turned to look at Bob. Bob was nodding. “You know, don’t you,” he said.

“You run the all-thread rod to the top of the pipe,” I said.

“That’s right,” said Bob. “Next time you have a question, I want you to come in here and ask the duck, not me. Ask it out loud. If you still don’t know the answer, then you can ask me.”

“Okay,” I said, and got back to work.

The Rack Race update 1

Its time to revisit the the question, “How much compute/ RAM can we get in a 42U rack ? ”

Using the SunBlade 6000 chassis you can get 10 in Blades in 10U. When we fully populate the rack with T4-1B blades we get 40 SPARC procs @ 2.85GHz ( 2560 threads)

…and 256GB of RAM * 40 machines = 10240 GB of RAM i.e. 10TB !

Given the SPARC road map, and the likely doubling of the core count (achievable following a die shrink to 25NM) for T5 chips, we could see a doubling of that thread count!

Its interesting to think that these machines can saturate 10GBe easily with plenty of CPU time to spare. This in mind, that would be 80 *  10Gbe ports, so you’ll need some decent network equipment to keep all those machines fed!

 

State the problem, specify the problem

Anyone working in a services / performance tuning role will quickly understand the value of the title.

For any problem solving to start, its critical for you to have a clear idea about what you think the problem actually is. That might sound obvious to you, but its very easy to get lost in someones description of  whats happening.

Imagine the scene where you get a phone call and someone says “you need to fix the network, it seems broken…”

What does that sentence really mean? You won’t find out until you start asking sensible questions about what the stakeholder is seeing. If the user was on a 10/100 Mbit and they were seeing about 10-12 MBs a second then thats probably about as fast as its going to go (note Mbit vs MB). To get over this “problem” we have to make a decision; compress the files, use a different machine etc etc.

Until you know the root cause of the problem, you can’t suggest a fix. You can’t even mitigate the issue.

Let’s say the above network was using an ACME switch, known to not be fully non-blocking. If you don’t know how much bandwidth is in use, then can you say for sure that just swapping out the switch for a brand new switch (of the same model) is going to fix it? No. So if you did that, you’d be swapping out a perfectly ok switch for a brand new one which is going to experience exactly the same behaviour.

Below is a video which is ficticious scenario, but fairly realistic. A user calls up and complains about the website being “down”. The webserver seems to be working, but he user insists that an action be taken. The analyst doesn’t take the time to actually determine what problem the user is seeing, and instead simply complies with the request to action. Watch the video to see the rest!

Jumping to cause broke the website completely, and could have been averted if the analyst stuck to his guns and produced a proper problem statement and description.

Keep in mind that the true root cause will explain the symptoms that are seen. So when someone makes a suggestion about what the cause could be, test it against the specification and see if it seems true.

Work and motivation

So what really motivates you? Heres a fascinating little video about the use of money as a motivator for work…

New Sun/Oracle hardware

Well, its a while now but new hardware has been anounced and it really is quite impressive!

Key Stats

Theres more than the list that I’m showing, but theses are the most interesting ones. Among other bits are the X4170, X6270 and some new NEMS for the SunBlade 6000 chasis.

X4800

  • 5 Rack Units high
  • 1 TB of RAM (With 8GB DIMMS, 128 slots)
  • 4 or 8 * Xeon 7600 CPUS (each with 8 cores)
  • 8 PCIe slots
  • Up to 8 * 300GB   2.5 inch SAS-2 disks
  • Two NEMS, each with four 10Gb Ethernet ports
  • Redundant power supplies

X4470

  • 3 Rack Units high
  • 512 GB RAM (with 8GB DIMMS, 64 slots)
  • 2 or 4 Xeon 7500 series CPUS (each 8 cores)
  • 10 PCIe slots
  • Up to 6 * 300GB 2.5 inch SAS-2 disks
  • Redundant power supplies

X4170M2 / X4270 M2

  • 1 and 2 Rack units respectively
  • Up to 12 * 300GB SAS-2 2.5 inch , or up to 24 * 300GB SAS-2 2.5 inch disks
  • 2 CPUs each
  • 144GB RAM each
  • 4 Gb Ethernet onboard each

These images were shamlesly copied from www.c0t0d0s0.org, who also wrote a far better artcile than I did!

Google chrome benchmarked

Well, it appears that google chrome is faster than alot of things. Namely:

  1. Potatoes fired from a cannon
  2. Paint shot by sound wave energy
  3. Lightning striking a little ship (big ships untested)

All is explained and proved in the following little video. Credit to the editor of this filming, but I do have to say, the final test doesn’t look 100% fair, the mouse may have been clicked a split second too soon.

Robert Fisk on modern journalism

I thought I’d share a lecture given by mid-east reporter Robert Fisk. Here he expresses his views on the discourse of modern journalism, and the effects that the news have had on him. I admire his ability to not only reflect on his thoughts about current affairs, but to reflect on his own qualities as a human being. I do wonder how many people would admit to an open audience their own failings, and then follow up with their desire to correct themselves in a humble fashion.

The under appreciated bourne shell “:” operator

“:” is a little known Bourne Shell operator which is actually quite handy. However, like a alot of other short hand operators, its easy to forget, especially when its not used that much.

So what can it do?

  • You can replace the true command with it, letting you write something like:

while :
do
some_commands
done

  • Leave the then part of an if statement empty:

if :
then :
else :
fi

I agree, that example is probably useless for now, but amusing none the less.

So there you are! Next time you fancy steering from the norm of using true, you know what to do!

Can the long war be won?

This interview gives an excellent overview of the current state of  “the long war”, and how the US is now in its longest ever conflict with a failed strategy. Its well worth reading, and is perhaps some of the most realistic analysis of the state of play in Afghanistan this year.

Part One of the interview was aired on TV, Part Two of the interview was distributed on YouTube

The transcript of the interview goes as follows  (the original Transcript can be found here) :

April 9, 2010

BILL MOYERS: Welcome to the Journal. The war in Afghanistan has claimed more than one thousand American lives and in the last two years alone the lives of more than four thousand Afghan civilians. It’s costing American taxpayers over three-and-a-half billion dollars every month—a total of some $264 billion so far. But for all that, in the words of one policy analyst quoted by the New York Times this week, “there are no better angels about to descend on Afghanistan.”

The news from that torturous battleground continues to dismay, discourage and enrage. America’s designated driver there, Hamid Karzai, is proving increasingly unstable behind the wheel. The United States put Karzai in power and our soldiers have been fighting and dying on his behalf ever since. Despite widespread corrupton in his government. Now he’s making threats against the western coalition that is shedding blood and treasure on his behalf.

Even more disturbing,for the moment, are the civilian deaths from nighttime raids andaerial bombings by American and other NATO troops. Just this week, we learned of an apparent cover-up following a Special Forces raid in February that killed five civilians, including three women, two of whom were pregnant. It’s believed bullets were gouged from the women’s bodies to conceal evidence of American involvement.

This slaughter of innocents has led the pro-American “Economist” magazine to question whether ourentire effort in Afghanistan” has been nothing but a meaningless exercise of misguided violence.”

With me is a man with first-hand experience of war. Andrew Bacevich served 23 years, some of them in Vietnam, before retiring from the Army. He’s now professor of history and international relations at Boston University. Just this week he was at a US Army War College symposium on the highly pertinent question, “How do we know when a war is over?” His book, “The Limits of Power,” was a best-seller and his latest, “Washington Rules: America’s Path to Permanent War,” comes out this summer. Andrew Bacevich, welcome back to the Journal.

ANDREW BACEVICH: Thank you very much.

BILL MOYERS: These civilian casualties that we’ve been hearing about, they’re inevitable in war, right?

ANDREW BACEVICH: Sure they are. But I think that what’s particularly important about the incidents that we’re reading about is that they really call into question U.S. strategy. I mean, when General McChrystal conceived of this counterinsurgency approach in Afghanistan, one of the, sort of the core principles is that we would act in ways that would demonstrate our benign intentions. We’re supposed to be protecting the population. And when it turns out that U.S. forces are killing non-combatants, and there are repeated incidents that have occurred, I think it calls into question the sincerity, the seriousness of the strategy. Or it calls into question the extent to which McChrystal is actually in control of the forces that he commands.

There doesn’t seem to be any noticeable change, and any noticeable reduction in the frequency with which these incidents are occurring. So, I mean, were I an Afghan, I think I would not place a whole heck of a lot of credibility on the claims that, you know, “We’re here to help.”

BILL MOYERS: That nighttime incident in February that I referred to, you know, one woman killed was a pregnant mother of 10 children. Another was a pregnant mother of 6 children. And our people peddled the story at the time that they had been stabbed to death by family members on an otherwise festive occasion. Was that a lie, do you think, a deliberate lie?

ANDREW BACEVICH: Based on the reports that we read in “The New York Times,” yes, it was a deliberate lie. I mean, I think one of the hidden issues here, and it’s one that really needs to be brought to the surface, is we have two kinds of forces operating in Afghanistan. We have conventional forces.

BILL MOYERS: The Marines and infantry.

ANDREW BACEVICH: Right. And they are accompanied by reporters. We get at least some amount of information about what these forces are doing and how they’re doing it. But in a sense, we have a second army. And the second army are the units that comprise Special Operations forces. They exist in secrecy. They operate in secrecy. Clearly there was a violation of some kind in that incident in February that killed the pregnant women.

The question is, are they being held accountable? Who’s being fired? Who’s being disciplined? What actions are being taken to ensure that incidents like that will not occur again? And again, this secrecy, the fact that they operate behind this black curtain, I think, makes it more difficult for that kind of accountability to be asserted.

BILL MOYERS: To whom are they responsible behind that black curtain?

ANDREW BACEVICH: Well, presumably they’re responsible to General McChrystal, who is the senior US and NATO commander in Afghanistan. And McChrystal himself comes out of the Special Operations community. That’s his entire background is in Special Operations. And you might wonder whether or not that gives him a better understanding of Special Operations to enable him to use that capability more precisely. Or you might wonder if it makes him too sympathetic to Special Operations. They’re his guys, so give them a break.

BILL MOYERS: General McChrystal himself has said that we’ve shot – and this is his words not mine—an amazing number of people over there who did not seem to be a threat to his troops.

ANDREW BACEVICH: I think that is—that’s clearly the case. When McChrystal was put in command last year, and devised his counterinsurgency strategy, the essential core principle of that strategy is that we will protect the population. We will protect the people. And the contradiction is that ever since President Obama gave McChrystal the go-ahead to implement that strategy, we have nonetheless continued to have this series of incidents in which we’re not only not protecting the population. But indeed we’re killing non-combatants.

BILL MOYERS: Given what’s happening in the killing of these innocent people, is the very term, “military victory in Afghanistan,” an oxymoron?

ANDREW BACEVICH: Oh, this is—yes. And I think one of the most interesting and indeed perplexing things that’s happened in the past three, four years is that in many respects, the officer corps itself has given up on the idea of military victory. We could find any number of quotations from General Petraeus, the central command commander, and General McChrystal, the immediate commander in Afghanistan, in which they say that there is no military solution in Afghanistan, that we will not win a military victory, that the only solution to be gained, if there is one, is through bringing to success this project of armed nation-building.

And the reason that’s interesting, at least to a military historian of my generation, of the Vietnam generation, is that after Vietnam, this humiliation that we had experienced, the collective purpose of the officer corps, in a sense, was to demonstrate that war worked. To demonstrate that war could be purposeful.

That out of that collision, on the battlefield, would come decision, would come victory. And that soldiers could claim purposefulness for their profession by saying to both the political leadership and to the American people, “This is what we can do. We can, in certain situations, solve very difficult problems by giving you military victory.”

Well, here in the year 2010, nobody in the officer corps believes in military victory. And in that sense, the officer corps has, I think, unwittingly really forfeited its claim to providing a unique and important service to American society. I mean, why, if indeed the purpose of the exercise in Afghanistan is to, I mean, to put it crudely, drag this country into the modern world, why put a four-star general in charge of that? Why not—why not put a successful mayor of a big city? Why not put a legion of social reformers? Because the war in Afghanistan is not a war as the American military traditionally conceives of war.

BILL MOYERS: Well, President Obama was in Afghanistan not too long ago, as you know. And he attempted to state the purpose of our war there to our troops.

PRESIDENT BARACK OBAMA: Our broad mission is clear. We are going to disrupt and dismantle, defeat and destroy al Qaeda and its extremist allies. That is our mission. And to accomplish that goal, our objectives here in Afghanistan are also clear. We’re going to deny al Qaeda safe haven. We’re going to reverse the Taliban’s momentum. We’re going to strengthen the capacity of Afghan security forces and the Afghan government so that they can begin taking responsibility and gain confidence of the Afghan people.

BILL MOYERS: That sounds to me like a traditional, classical military assignment, to find the enemy and defeat him.

ANDREW BACEVICH: Well, but there’s also then the reference to sort of building the capacity of the Afghan government. And that’s where, of course, the president, he’d just come from this meeting with President Karzai. Basically, as we understand from press reports, the president sort of administered a tongue-lashing to Karzai to tell him to get his act together. Which then was followed by Karzai issuing his own tongue-lashing, calling into question whether or not he actually was committed to supporting the United States in its efforts in Afghanistan. And again, this kind of does bring us back, in a way, to Vietnam, where we found ourselves harnessed to allies, partners that turned out to be either incompetent or corrupt. Or simply did not share our understanding of what needed to be done for that country.

BILL MOYERS: What does it say to you as a soldier that our political leaders, time and again, send men and women to fight for, on behalf of corrupt guys like Karzai?

ANDREW BACEVICH: Well, we don’t learn from history. And there is this persistent, and I think almost inexplicable belief that the use of military force in some godforsaken country on the far side of the planet will not only yield some kind of purposeful result, but by extension, will produce significant benefits for the United States. I mean, one of the obvious things about the Afghanistan war that is so striking and yet so frequently overlooked is that we’re now in the ninth year of this war.

It is the longest war in American history. And it is a war for which there is no end in sight. And to my mind, it is a war that is utterly devoid of strategic purpose. And the fact that that gets so little attention from our political leaders, from the press or from our fellow citizens, I think is simply appalling, especially when you consider the amount of money we’re spending over there and the lives that are being lost whether American or Afghan.

BILL MOYERS: But President Obama says, our purpose is to prevent the Taliban from creating another rogue state from which the jihadists can attack the United States, as happened on 9/11. Isn’t that a strategic purpose?

ANDREW BACEVICH: I mean, if we could wave a magic wand tomorrow and achieve in Afghanistan all the purposes that General McChrystal would like us to achieve, would the Jihadist threat be substantially reduced as a consequence? And does anybody think that somehow, Jihadism is centered or headquartered in Afghanistan? When you think about it for three seconds, you say, “Well, of course, it’s not. It is a transnational movement.”

BILL MOYERS: They can come from Yemen. They can come from—

ANDREW BACEVICH: They can come from Brooklyn. So the notion that somehow, because the 9/11 attacks were concocted in this place, as indeed they were, the notion that therefore, the transformation of Afghanistan will provide some guarantee that there won’t be another 9/11 is patently absurd. Quite frankly, the notion that we can prevent another 9/11 by invading and occupying and transforming countries is absurd.

BILL MOYERS: In this context, then, what do we do about what is a real threat, from people who want to kill us, the Jihadists. What do we do about that?

ANDREW BACEVICH: First of all, we need to assess the threat realistically. Osama bin Laden is not Adolf Hitler. Al-Qaeda is not Nazi Germany. Al-Qaeda poses a threat. It does not pose an existential threat. We should view Al-Qaeda as the equivalent of an international criminal conspiracy. Sort of a mafia that in some way or another draws its energy or legitimacy from a distorted understanding of a particular religious tradition.

And as with any other international criminal conspiracy, the proper response is a police effort. I mean, a ruthless, sustained, international police effort to identify the thugs, root out the networks and destroy it. Something that would take a long period of time and would no more succeed fully in eliminating the threat than the NYPD is able to fully eliminate criminality in New York City.

BILL MOYERS: You participated this week in a symposium at the Army War College in Carlisle, Pennsylvania, on the subject, “How will we know when a war ends?” So, the boots are on the ground there. The troops are there, committed, at least through 2011. What do we do?

ANDREW BACEVICH: Well, I have to say, and I mean, I’m sure this sounds too simplistic. It would be way too simplistic for people in Washington. But if you want to get out of a war, you get out of a war. I mean, you call General McChrystal and say, “Your mission has changed. And your mission is to organize an orderly extrication of US forces.”

You know, if it were me, I’d say, “General McChrystal, call me back in two weeks and tell me what the plan is and how long it’s going to take.” But war termination for us has come to be very difficult, because of our inability to understand the war that we undertake.

We are now close to a decade into what the Pentagon now calls, “The Long War.” And it is a war in which one-half of one percent of the American people bear the burden. And the other 99.5 percent basically go on about their daily life, as if the war did not exist.

I mean, the great paradox of the Long War, is that it seems the Long War consists of a series of campaigns with Iraq and Afghanistan being the two most important, although one could add Pakistan and Yemen to the list, in which there seems to be no way to wind down the campaign.

Or to claim from the campaign some positive benefit that allows us to say that the end date of the long war is any closer. And we do find ourselves in this circumstance where permanent war now seems to have become the norm. And we don’t know what to do about that.

BILL MOYERS: There’s something else that President Obama said when he was in Afghanistan. Take a look at this:
PRESIDENT BARACK OBAMA: The United States of America does not quit once it starts on something. You don’t quit, the American Armed Services does not quit, we keep at it, we persevere, and together with our partners we will prevail. I am absolutely confident of that.

BILL MOYERS: How do you read that?

ANDREW BACEVICH: Well, I think the president has, he’s placed down this enormous bet. A bet involves 100 thousand American soldiers.

And the deterioration of circumstances, for example, if Karzai turns out to be an unreliable ally, even that will make it extraordinarily difficult for the president to now say, “Well, I’ve changed my mind. I’m going to take that, I’m going to take that bet off the table.” So in that sense, the rhetoric is not at all surprising, I think. And of course, it’s historically incorrect. We quit after the Mogadishu firefight in Somalia. I think that it probably was prudent to quit. That doesn’t make Somalia a great place today. We quit in Vietnam, having paid an enormous cost, to try to maintain the viability of South Vietnam. So there are times actually when it makes sense to quit.

BILL MOYERS: Should we quit in Afghanistan?

ANDREW BACEVICH: I think so. I mean again, I believe that ultimately, a sound foreign policy should be informed by an enlightened understanding of one’s own interests. That’s what we pay people like President Obama big money to do, to advance our collective interests, what’s good for this country, this people. And the perpetuation of the war in Afghanistan is not good for this country and for our people.

BILL MOYERS: Why?

ANDREW BACEVICH: Because we are squandering our treasure. We are losing lives for no purpose. And ultimately, the perpetuation of this unnecessary war does, I think, serve to exacerbate the problems within the Islamic world, rather than reducing those problems.

BILL MOYERS: Andrew Bacevich, thank you for joining me on the Journal. And we’ll continue this conversation on our website at PBS.org.