Skip to content

Instantly share code, notes, and snippets.

@jfrost
Created August 2, 2013 23:25
Show Gist options
  • Save jfrost/6144255 to your computer and use it in GitHub Desktop.
Save jfrost/6144255 to your computer and use it in GitHub Desktop.
kernelpkgs:
pkg.installed:
- sources:
- linux-image-3.9.4-custom: salt://kernel/linux-image-3.9.4-custom_3.9.4-custom-10.00.Custom_amd64.deb
- linux-headers-3.9.4-custom: salt://kernel/linux-headers-3.9.4-custom_3.9.4-custom-10.00.Custom_amd64.deb
@jfrost
Copy link
Author

jfrost commented Aug 5, 2013

vagrant@app:$ dpkg --list salt-minion
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-=========================================-=========================================-==================================================================================================
ii salt-minion 0.16.0-8234
precise1 This package represents the client package for salt

End up with this when I'm running a masterless minion (but used to work ok):

[INFO ] Loading fresh modules for state activity
[INFO ] Executing state pkg.installed for kernelpkgs
[INFO ] Executing command 'dpkg-deb -I "/vagrant/salt-master-etc/srv/kernel/linux-headers-3.9.4-custom_3.9.4-custom-10.00.Custom_amd64.deb"' in directory '/root'
[INFO ] Executing command 'dpkg-deb -I "/vagrant/salt-master-etc/srv/kernel/linux-image-3.9.4-custom_3.9.4-custom-10.00.Custom_amd64.deb"' in directory '/root'
[ERROR ] Package file salt://kernel/linux-headers-3.9.4-custom_3.9.4-custom-10.00.Custom_amd64.deb (Name: linux-headers-3.9.4-custom:amd64) does not match the specified package name (linux-headers-3.9.4-custom).
[ERROR ] Package file salt://kernel/linux-image-3.9.4-custom_3.9.4-custom-10.00.Custom_amd64.deb (Name: linux-image-3.9.4-custom:amd64) does not match the specified package name (linux-image-3.9.4-custom).
[ERROR ] No changes made for kernelpkgs

Here's what that dpkg-deb -I returns:

vagrant@app:~$ dpkg-deb -I /vagrant/salt-master-etc/srv/kernel/linux-headers-3.9.4-custom_3.9.4-custom-10.00.Custom_amd64.deb
new debian package, version 2.0.
size 8641458 bytes: control archive= 222330 bytes.
808 bytes, 21 lines control
1123875 bytes, 11360 lines md5sums
5160 bytes, 172 lines * postinst #!/usr/bin/perl
5160 bytes, 172 lines * postrm #!/usr/bin/perl
5160 bytes, 172 lines * preinst #!/usr/bin/perl
5160 bytes, 172 lines * prerm #!/usr/bin/perl
Package: linux-headers-3.9.4-custom
Source: linux-source-3.9.4-custom
Version: 3.9.4-custom-10.00.Custom
Architecture: amd64
Maintainer: Unknown Kernel Package Maintainer unknown@unconfigured.in.etc.kernel-pkg.conf
Installed-Size: 45926
Depends: libc6 (>= 2.14)
Recommends: libc6-dev | libc-dev, gcc | c-compiler, make (>= 3.80-10), binutils (>= 2.12), util-linux (>= 2.10o)
Suggests: module-init-tools (>= 0.9.10), e2fsprogs (>= 1.29)
Provides: linux-headers, linux-headers-3.9
Section: devel
Priority: optional
Description: Header files related to Linux kernel, specifically,
version 3.9.4-custom
.
This package provides kernel header files for sites
that want the latest kernel headers for version
3.9.4-custom.
Please read
/usr/share/doc/linux-headers-3.9.4-custom/debian.README.gz
for details

vagrant@app:~$ cat /etc/salt/minion
file_roots:
base:
- /vagrant/salt-master-etc/srv

pillar_roots:
base:
- /vagrant/salt-master-etc/pillar/srv

file_client: local

@jfrost
Copy link
Author

jfrost commented Aug 5, 2013

Oh, I see, it didn't like the lack of :amd64 on the end of the package name, so this diff fixes it:

diff --git a/srv/kernel/init.sls b/srv/kernel/init.sls
index 058c2f0..04ffb3c 100644
--- a/srv/kernel/init.sls
+++ b/srv/kernel/init.sls
@@ -1,5 +1,5 @@
kernelpkgs:
pkg.installed:
- sources:

  •  - linux-image-3.9.4-custom: salt://kernel/linux-image-3.9.4-custom_3.9.4-custom-10.00.Custom_amd64.deb
    
  •  - linux-headers-3.9.4-custom: salt://kernel/linux-headers-3.9.4-custom_3.9.4-custom-10.00.Custom_amd64.deb
    
  •  - "linux-image-3.9.4-custom:amd64": salt://kernel/linux-image-3.9.4-custom_3.9.4-custom-10.00.Custom_amd64.deb
    
  •  - "linux-headers-3.9.4-custom:amd64": salt://kernel/linux-headers-3.9.4-custom_3.9.4-custom-10.00.Custom_amd64.deb
    

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