sous-chefs / docker

Development repository for the docker cookbook
https://supermarket.chef.io/cookbooks/docker
Apache License 2.0
1.35k stars 794 forks source link

set lsb codename #1228

Closed pyama86 closed 1 year ago

pyama86 commented 1 year ago

Description

    Mixlib::ShellOut::ShellCommandFailed                                                                                             
    ------------------------------------                                                                                             
    Expected process to exit with [0], but received '100'                                                                            
    ---- Begin output of ["apt-cache", "policy", "apt-transport-https"] ----                                                         
    STDOUT:                                                                                                                          
    STDERR: E: Malformed entry 1 in list file /etc/apt/sources.list.d/Docker.list (Component)                                        
    E: The list of sources could not be read.                                                                                        
    ---- End output of ["apt-cache", "policy", "apt-transport-https"] ----                                                           
    Ran ["apt-cache", "policy", "apt-transport-https"] returned 100  

I realized the above errror when executing cinc-client(localmode) It is apt source when happend error.

# cat sources.list.d/Docker.list                                                                            
deb      [arch=amd64] https://download.docker.com/linux/ubuntu stable 

then, I fixed it due to setting destribution attributes. please check it.

Issues Resolved

https://github.com/sous-chefs/docker/issues/1207 List any existing issues this PR resolves

Check List

pyama86 commented 1 year ago

The real cause seemed to be the lack of lsb information in ohai

node.json  | jq . | grep -C5 lsb                                                
    "counters": {                                                                                                                    
      "network": {                                                                                                                   
        "interfaces": {}                                                                                                             
      }                                                                                                                              
    },                                                                                                                               
    "lsb": {},                                                                                                                       
    "os": "linux",        
pyama86 commented 1 year ago

I solved this by installing the lsb-release package.