Opened 7 years ago

Closed 7 years ago

#5495 closed Task/To do item (fixed)

Update drush version on puppet controlled servers to use squeeze-backports

Reported by: Nat Meysenburg Owned by: Jamie McClelland
Priority: Medium Component: Tech
Keywords: Cc:
Sensitive: no

Description

The version of drush installed on most of our servers is the version in squeeze mainline(version 3.3). Drush has been under serious development since this version there are many improvements and bug fixes in later versons. There is a newer version in squeeze-backports (version 4.5).

Can we configure puppet to pull in this newer version from squeeze-backports it will make all of our Drupal sites easier to administer and support?

Change History (4)

comment:1 Changed 7 years ago by Daniel Kahn Gillmor

Owner: set to Ross
Status: newassigned

Yes, we should do this. the drush maintainer for debian (anarcat) is quite responsive and responsible about making sure the backported version is functional.

I'm going to assign this to Ross so he can make this change because i don't know how myself :) Probably, you want to adjust /etc/apt/preferences to contain a stanza like the following:

Package: drush
Pin: release n=squeeze-backports
Pin-Priority: 600

but i dunno what the canonical way to do this is in puppet.

Ross, if you could document the changes you make to make this happen, that'd help other folks take on this kind of work when similar requests come up in the future.

comment:2 Changed 7 years ago by Ross

Owner: changed from Ross to Jamie McClelland

I'm not sure how to do this canonically in puppet either.

Here's what I did:

I created a preferences.squeeze file with dkg's proposed preferences in ./puppet/modules/mayfirst/files/apt/ and committed those changes.

What I did not do:

I did not make changes to ./puppet/modules/mayfirst/manifests/minimal.pp

  # until we upgrade the backup servers to squeeze, squeeze installations                                      
  # have to pull in lenny and install rdiff-backup, python and python-minimal                                  
  # from lenny                                                                                                 
  case $lsbdistcodename {                                                                                      
    'squeeze': {                                                                                               
      m_apt::source { "update.list":                                                                           
        content => "deb http://ftp.us.debian.org/debian/ squeeze-updates main"                                 
      }                                                                                                        
    }                                                                                                          
    'lenny': {                                                                                                 
      file { "/etc/apt/preferences":                                                                           
        source => "puppet:///modules/mayfirst/apt/preferences.lenny",                                          
        ensure => present                                                                                      
      }                                                                                                        
      m_apt::source { "backports.list":                                                                        
        content => "deb http://backports.debian.org/debian-backports lenny-backports main\n"                   
      }                                                                                                        
    }                                                                                                          
  }      

I'm not sure why the lenny stanza above says '/etc/apt/preferences' as the file. It seems that preferences should be written to the '/etc/apt/preferences.d/' directory? I'm not clear on how we would make that change.

It also seems like we need to include a backports.list for squeeze. I'm not 100% clear if this means adding another stanza or not.

I'm re-assigning this to jamie for further clarification and implementation.

~/ross

comment:3 Changed 7 years ago by Jamie McClelland

Hi ross and dkg,

Thanks for moving this along.

The reason the lenny stanza specifies /etc/apt/preferences is because in lenny, apt didn't support a preferences.d file so we had to overwrite /etc/apt/preferences. I've ripped that stanza out because we are no longer using lenny.

Then, I created a stanza in mosh.pp to handle this preference (because we only want it for mosh servers I think). And I added a stanza in mosh.pp to include squeeze-backports (which weren't included before). Lastly, I renamed the preferences file to be: drush.squeeze.backports.pref

Here are the resulting stanzas added to mosh.pp:

	m_apt::source { "squeeze.backports.list":
    content => "deb http://backports.debian.org/debian-backports squeeze-backports main"
	}
	file { "/etc/apt/preferences.d/drush.squeeze.backports.pref":
		source => "puppet:///modules/mayfirst/apt/drush.squeeze.backports.pref",
		ensure => present
  }

This has been pushed to mfpl (and tested on chavez), but not pushed to all the other mosh's yet.

comment:4 Changed 7 years ago by Jamie McClelland

Resolution: fixed
Status: assignedclosed

Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.