Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@EvanCarroll
Copy link

@EvanCarroll EvanCarroll commented Dec 22, 2017

Now we're not 16.04 specific.

@msftclas
Copy link

msftclas commented Dec 22, 2017

CLA assistant check
All CLA requirements met.

@PRMerger3
Copy link
Contributor

@EvanCarroll : Thanks for your contribution to the SQL documentation! The author, @edmacauley, has been notified to review your proposed change.

@EvanCarroll
Copy link
Author

EvanCarroll commented Dec 22, 2017

Normally, people don't put repos in repos. They have one pool which has all their packages for the repo. I would suggest microsoft adopt this strategy. Hosting sql-server under

 https://packages.microsoft.com/ubuntu/16.04/mssql-server/pool/main/m/mssql-server/

And not making it available under

https://packages.microsoft.com/ubuntu/17.04/prod/pool/main/m/

Will just confuse people who look to add the repository for their distro version. Hosting a SQL Server repository arbitrarily in the directory structure of another repository for a different version of their operating system is going to be confusing.

@EvanCarroll
Copy link
Author

There we go, now it should be fixed

* Update docs to use lsb_release inaddition to the hard coded distro
  Now MS can roll out changes from the 17.04 branch to override 16.04
  if they want to or need to
* Remove the need to run the script as root
  * We should never run sqlservr as root, as all the files *need* to be
  owned by mssql
  * We should never run sqlcmd as root
  * Root should *never* run files not owned by root, did you audit this?
@edmacauley
Copy link
Contributor

edmacauley commented Dec 22, 2017

Proposed changes to the automated install script don't work. Two examples: the script must still be run with sudo and the sql server conf line fails as mssql is not in the sudoers list. This is on a stock Ubuntu 16.04.

Pinging @rothja as he's the author of the other article in this PR.

edit: Sorry, meant to say "Do not recommend we merge changes as is, will see if I can get a working version of the script to propose changes back to you."

@rothja
Copy link
Collaborator

rothja commented Dec 22, 2017

@EvanCarroll Thanks for the detailed suggestions you've provided in these files. Ed and I are reviewing your changes, and we'll probably have a few tweaks to your recommendations before publishing. I have a few questions for you.

First, I see you're adding a new repository that takes the output from lsb_release. So you have that there to anticipate Microsoft creating new binaries specifically for the verison you currently running that is greater than 16.04?

Second, is your only concern about running the script as root that we do some things as root that could be avoided, such as launching sqlcmd? Otherwise, most of the actions require sudo during the installation process anyway, right?

I think you're removing some of the apt-get update calls. I believe those are necessary to refresh the package lists before attempting to install. If that is not the case, let me know.

We might have other questions as we go through your changes. Thanks, again for helping to make the content better.

@EvanCarroll
Copy link
Author

EvanCarroll commented Dec 22, 2017

Yes, that's a very professional response. The separate repo is a bad idea -- still glad Microsoft is packaging in rpm and deb so keep up the forward progress. That said, that little bit with separate repos is confusing -- it confused me anyway -- and more importantly provides no advantages to Microsoft. The convention for third parties is to package for the distro, not for the product.

It's not just sqlcmd that should not be run as root. On my system, there is an mssql user that owns all of the files for the server. Starting the server up as root is a bad idea. I would argue even allowing the server to run as root is a bad idea -- the server should just die if it's run as root. But if the server touches a file and that file is owned by root, you've got a problem when the server wants to edit it.

And, that's happened already, one of the highest voted questions for [linux]+[sql-server] on dba.se stems from a user running sqlservr as root.

@EvanCarroll
Copy link
Author

EvanCarroll commented Dec 22, 2017

mssql is not in the sudoers list.

We're not running sudo as mssql, you run the script as any user. It runs the system utilities required as root, and the server and the client as mssql. @edmacauley

When you run sudo -u mssql whoami it runs whoami as mssql from your current user.

@edmacauley
Copy link
Contributor

Hi Thanks again for these changes. Right now we're going to need to not make most of your proposed changes. I have incorporated your changes w/ sudo and they should be published live soon. We cannot change the version language or repos at this time, we only officially support Ubuntu 16.04 right now. The product team will need to review before we can make those changes and I don't have a timeframe for that right now.
#please-close

@rothja
Copy link
Collaborator

rothja commented Dec 22, 2017

@EvanCarroll One of the problems we have at the moment is that many people are out for the holidays and we'll need to get some consensus on some of your suggestions. I'm out for the next week and a half as well. But I'll put this on my calendar to keep investigating your suggestions and talking to others about your repository recommendations. Thanks, again.

@PRMerger3 PRMerger3 closed this Dec 22, 2017
@EvanCarroll
Copy link
Author

EvanCarroll commented Dec 24, 2017

A couple of things

  • mssql-tools is only in 16.04. That means you now have to have 3 repos installs to add sql server, sqlcmd, and dotnet all by the same publisher.
  • the method used in the dotnet distros of writing to files in sources.d rather than using add-apt-repository is better imho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.