Issue #22194 has been updated by Justin Holguin.

Status changed from Unreviewed to Needs More Information

I'm not totally sure, but it looks like you might be able to solve this by 
putting the mirror argument in a single-element array like this:

zpool { ‘rpool’: 
   ensure => present, 
   mirror => [‘c0t2d0 c0t3d0’], 
}

Would you give that a try and report back please?

----------------------------------------
Bug #22194: solaris zpool passes mirror parameters as one value to zpool command
https://projects.puppetlabs.com/issues/22194#change-98416

* Author: Steve Foster
* Status: Needs More Information
* Priority: Normal
* Assignee: 
* Category: Solaris
* Target version: 
* Affected Puppet version: 3.2.2
* Keywords: solaris, zpool
* Branch: 
----------------------------------------
given the following:

zpool { 'rpool':
  ensure => present,
  mirror => 'c0t2d0 c0t3d0',
}

or

/opt/csw/bin/puppet resource --debug zpool rpool ensure=present mirror="c0t2d0 
c0t3d0"

puppet logs the following error:

Aug 15 11:04:36 dnsserv01c puppet-agent[24737]: [ID 702911 daemon.error] 
Execution of '/usr/sbin/zpool create rpool mirror c0t2d0 c0t3d0' returned 1: 
cannot open 'c0t2d0 c0t3d0': no such device in /dev/dsk
Aug 15 11:04:36 dnsserv01c puppet-agent[24737]: [ID 702911 daemon.error] must 
be a full path or shorthand device name
Aug 15 11:04:36 dnsserv01c puppet-agent[24737]: [ID 702911 daemon.error] 
(/Stage[main]//Node[default]/Zpool[rpool]/ensure) change from absent to present 
failed: Execution of '/usr/sbin/zpool create rpool mirror c0t2d0 c0t3d0' 
returned 1: cannot open 'c0t2d0 c0t3d0': no such device in /dev/dsk
Aug 15 11:04:36 dnsserv01c puppet-agent[24737]: [ID 702911 daemon.error] 
(/Stage[main]//Node[default]/Zpool[rpool]/ensure) must be a full path or 
shorthand device name

This is because the 2 disks are passed as 1 value to the zpool command, the 
following truss snippit shows argc and argv:

2902:   execve("/usr/sbin/zpool", 0x07FD9320, 0x08555348)  argc = 5
2902:    argv: /usr/sbin/zpool create rpool mirror c0t2d0 c0t3d0

I think argc should be 6 in this case...

Further down I can see the following:
2902:   open("/dev/rdsk/c0t2d0 c0t3d0s2", O_RDWR|O_NDELAY) Err#2 ENOENT
2902:   stat64("/dev/dsk/c0t2d0 c0t3d0", 0x080433F0)    Err#2 ENOENT
2902:   fstat64(2, 0x080424A0)                          = 0
2902:   write(2, " c a n n o t   o p e n  ".., 13)      = 13
2902:   write(2, " c 0 t 2 d 0   c 0 t 3 d".., 13)      = 13
2902:   write(2, " ' :   n o   s u c h   d".., 21)      = 21
2902:   write(2, " / d e v / d s k", 8)                 = 8
2902:   write(2, "\n", 1)                               = 1
2902:   write(2, " m u s t   b e   a   f u".., 45)      = 45




-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to