The resignation of Solicitor-General Justin Gleeson places the Prime Minister in a difficult position: he must decide just how much damage he will allow his bumbling Attorney-General, George Brandis, to inflict on Australia's key institutions before he either forces Brandis to resign or Brandis leaves of his own accord to take up another taxpayer-funded position outside politics, as seems likely.
As Gleeson's departure demonstrates, Brandis is no longer just a liability for the Turnbull government, he's a liability for the rule of law and good government. The Solicitor-General is not just another senior public servant -- he is intended to play a specific and very important role within the Commonwealth, as the source of binding legal advice for the government. That's why the position is the creation of a separate act (the Legal Officers Act 1964) and why the role is intended to be independent. Without an independent Solicitor-General, the only legal advice the government will have is the advice it wants to get from the public service (the Australian Government Solicitor), or privately from hand-picked barristers. That is, it will get the advice it wants politically, but not the advice it necessarily needs.