Jira (FACT-1082) COM initialization prior to ruby COM initialization

2015-07-07 Thread Shaigy Nixon (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Shaigy Nixon updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Facter /  FACT-1082 
 
 
 
  COM initialization prior to ruby COM initialization  
 
 
 
 
 
 
 
 
 

Change By:
 
 Shaigy Nixon 
 
 
 

QA Risk Severity:
 
 Medium 
 
 
 

QA Risk Probability:
 
 Medium 
 
 
 

QA Risk Assessment:
 
 Medium 
 
 
 

QA Highest Test Level:
 
 Unit 
 
 
 

QA Risk Assessment Reason:
 
 Windows modules using the feature will fail 
 
 
 

QA Status:
 
 Reviewed 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c) 
 
 
 
 
  
  

Jira (FACT-1082) COM initialization prior to ruby COM initialization

2015-07-07 Thread Shaigy Nixon (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Shaigy Nixon commented on  FACT-1082 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: COM initialization prior to ruby COM initialization  
 
 
 
 
 
 
 
 
 
 
Before fix: 
 
 
 
 
 
 
  
 
 
 
 
Administrator@qbtu7afcpcjsiom ~ 
 
 
 
 
$ cat foo.rb 
 
 
 
 
require 'win32ole' 
 
 
 
 
Facter.add('foo') do 
 
 
 
 
  setcode do 
 
 
 
 
'bar' 
 
 
 
 
  end 
 
 
 
 
end 
 
 
 
 
  
 
 
 
 
Administrator@qbtu7afcpcjsiom ~ 
 
 
 
   

Jira (FACT-1082) COM initialization prior to ruby COM initialization

2015-07-06 Thread Michael Smith (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Michael Smith commented on  FACT-1082 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
  Re: COM initialization prior to ruby COM initialization  
 
 
 
 
 
 
 
 
 
 
Michael Smith need to handle merge to Leatherman. 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.4.5#64020-sha1:78acd6c) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (FACT-1082) COM initialization prior to ruby COM initialization

2015-07-02 Thread Shaigy Nixon (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Shaigy Nixon assigned an issue to Shaigy Nixon 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Facter /  FACT-1082 
 
 
 
  COM initialization prior to ruby COM initialization  
 
 
 
 
 
 
 
 
 

Change By:
 
 Shaigy Nixon 
 
 
 

Assignee:
 
 qa Shaigy Nixon 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.3.15#6346-sha1:dbc023d) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (FACT-1082) COM initialization prior to ruby COM initialization

2015-07-02 Thread Michael Smith (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Michael Smith assigned an issue to qa 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Facter /  FACT-1082 
 
 
 
  COM initialization prior to ruby COM initialization  
 
 
 
 
 
 
 
 
 

Change By:
 
 Michael Smith 
 
 
 

Status:
 
 Ready for  CI  Test 
 
 
 

Assignee:
 
 qa 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.3.15#6346-sha1:dbc023d) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (FACT-1082) COM initialization prior to ruby COM initialization

2015-06-30 Thread Michael Smith (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Michael Smith assigned an issue to Michael Smith 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Facter /  FACT-1082 
 
 
 
  COM initialization prior to ruby COM initialization  
 
 
 
 
 
 
 
 
 

Change By:
 
 Michael Smith 
 
 
 

Assignee:
 
 Michael Smith 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.3.15#6346-sha1:dbc023d) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (FACT-1082) COM initialization prior to ruby COM initialization

2015-06-30 Thread Michael Smith (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Michael Smith updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Facter /  FACT-1082 
 
 
 
  COM initialization prior to ruby COM initialization  
 
 
 
 
 
 
 
 
 

Change By:
 
 Michael Smith 
 
 
 

Sprint:
 
 Client 2015-07-08 
 
 
 

Scrum Team:
 
 Client Platform 
 
 
 

Story Points:
 
 1 
 
 
 

Scope Change Reason:
 
 Impacts module for SG 
 
 
 

Scope Change Category:
 
 Found 
 
 
 

Release Notes Summary:
 
 Using WIN32OLE from Ruby as part of a custom fact in command-line Facter results in an error. This is fixed. 
 
 
 

Release Notes:
 
 Bug Fix 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 

Jira (FACT-1082) COM initialization prior to ruby COM initialization

2015-06-30 Thread Michael Smith (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Michael Smith updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Facter /  FACT-1082 
 
 
 
  COM initialization prior to ruby COM initialization  
 
 
 
 
 
 
 
 
 

Change By:
 
 Michael Smith 
 
 
 

Affects Version/s:
 
 FACT 3.0.0 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.3.15#6346-sha1:dbc023d) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (FACT-1082) COM initialization prior to ruby COM initialization

2015-06-30 Thread Peter Huene (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Peter Huene updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Facter /  FACT-1082 
 
 
 
  COM initialization prior to ruby COM initialization  
 
 
 
 
 
 
 
 
 

Change By:
 
 Peter Huene 
 
 
 

Fix Version/s:
 
 FACT 3.0.2 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.3.15#6346-sha1:dbc023d) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.


Jira (FACT-1082) COM initialization prior to ruby COM initialization

2015-06-30 Thread Travis Fields (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Travis Fields updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Facter /  FACT-1082 
 
 
 
  COM initialization prior to ruby COM initialization  
 
 
 
 
 
 
 
 
 

Change By:
 
 Travis Fields 
 
 
 
 
 
 
 
 
 
 OLE COM initialized prior to Ruby causing issue with later COM calls. [SQLSERVER Instances Fact | https://github.com/puppetlabs/puppetlabs-sqlserver/blob/master/lib/facter/sqlserver_instances.rb]  [sqlserver ole calls | https://github.com/puppetlabs/puppetlabs-sqlserver/blob/master/lib/puppet_x/sqlserver/features.rb#L21]   {noformat}[4:01 PM] Ethan J. Brown: it looks like Facter initializes COM in the wmi class (inside Leatherman) at https://github.com/puppetlabs/leatherman/blob/master/windows/src/wmi.cc#L34[4:01 PM] Ethan J. Brown: CoInitializeEx(0, COINIT_MULTITHREADED) Ruby initializes COM at https://github.com/ruby/ruby/blob/c19d37375074987b36413af6bf83df7262ce227d/ext/win32ole/win32ole.c#L...[4:02 PM] Ethan J. Brown: hr = OleInitialize(NULL); so if you call Puppet -> Facter, everything is OK[4:02 PM] Michael Smith: oh single vs multithreaded?[4:02 PM] Ethan J. Brown: however if you call in the reverse to resolve a custom fact then barf[4:03 PM] Ethan J. Brown: OleInitialize calls CoInitializeEx internally to initialize the COM library on the current apartment. Because OLE operations are not thread-safe, OleInitialize specifies the concurrency model as single-thread apartment. Once the concurrency model for an apartment is set, it cannot be changed. A call to OleInitialize on an apartment that was previously initialized as multithreaded will fail and return RPC_E_CHANGED_MODE. https://msdn.microsoft.com/en-us/library/windows/desktop/ms690134(v=vs.85).aspx[4:04 PM] Michael Smith: yeah, so we accept that it might've been initialized with single-threaded, but ruby errors out so I guess we have to initialize apartmentthreaded? ugh We could do so only when loaded in ruby... Wait, I'm still not sure how that happens.[4:06 PM] Travis Fields: it is when cfacter is called prior to ruby, if puppet is called first the fact that is returned is correct with no errors[4:06 PM] Ethan J. Brown: the output from Travis is at https://gist.github.com/cyberious/52410266b650afd94b59[4:06 PM] Peter Huene: facter initializes COM then tries to resolve a custom fact that uses ruby's COM support since ruby doesn't handle RPC_E_CHANGED_MODE it seems, boom[4:07 PM] Ethan J. Brown: correct[4:07 PM] Michael Smith: ok, so we just have to always use single-threaded. Well, we don't multi-thread queries to COM yet, so shouldn't cause any issues to change.{noformat} 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 

Jira (FACT-1082) COM initialization prior to ruby COM initialization

2015-06-30 Thread Travis Fields (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Travis Fields updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Facter /  FACT-1082 
 
 
 
  COM initialization prior to ruby COM initialization  
 
 
 
 
 
 
 
 
 

Change By:
 
 Travis Fields 
 
 
 
 
 
 
 
 
 
 OLE COM initialized prior to Ruby causing issue with later COM calls. {noformat}[4:01 PM] Ethan J. Brown: it looks like Facter initializes COM in the wmi class (inside Leatherman) at https://github.com/puppetlabs/leatherman/blob/master/windows/src/wmi.cc#L34[4:01 PM] Ethan J. Brown: CoInitializeEx(0, COINIT_MULTITHREADED) Ruby initializes COM at https://github.com/ruby/ruby/blob/c19d37375074987b36413af6bf83df7262ce227d/ext/win32ole/win32ole.c#L...[4:02 PM] Ethan J. Brown: hr = OleInitialize(NULL); so if you call Puppet -> Facter, everything is OK[4:02 PM] Michael Smith: oh single vs multithreaded?[4:02 PM] Ethan J. Brown: however if you call in the reverse to resolve a custom fact then barf[4:03 PM] Ethan J. Brown: OleInitialize calls CoInitializeEx internally to initialize the COM library on the current apartment. Because OLE operations are not thread-safe, OleInitialize specifies the concurrency model as single-thread apartment. Once the concurrency model for an apartment is set, it cannot be changed. A call to OleInitialize on an apartment that was previously initialized as multithreaded will fail and return RPC_E_CHANGED_MODE. https://msdn.microsoft.com/en-us/library/windows/desktop/ms690134(v=vs.85).aspx[4:04 PM] Michael Smith: yeah, so we accept that it might've been initialized with single-threaded, but ruby errors out so I guess we have to initialize apartmentthreaded? ugh We could do so only when loaded in ruby... Wait, I'm still not sure how that happens.[4:06 PM] Travis Fields: it is when cfacter is called prior to ruby, if puppet is called first the fact that is returned is correct with no errors[4:06 PM] Ethan J. Brown: the output from Travis is at https://gist.github.com/cyberious/52410266b650afd94b59[4:06 PM] Peter Huene: facter initializes COM then tries to resolve a custom fact that uses ruby's COM support since ruby doesn't handle RPC_E_CHANGED_MODE it seems, boom[4:07 PM] Ethan J. Brown: correct[4:07 PM] Michael Smith: ok, so we just have to always use single-threaded. Well, we don't multi-thread queries to COM yet, so shouldn't cause any issues to change.{noformat} 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 

Jira (FACT-1082) com initialization prior to ruby com initialization

2015-06-30 Thread Travis Fields (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Travis Fields created an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Facter /  FACT-1082 
 
 
 
  com initialization prior to ruby com initialization  
 
 
 
 
 
 
 
 
 

Issue Type:
 
  Bug 
 
 
 

Assignee:
 

 Unassigned 
 
 
 

Created:
 

 2015/06/30 4:13 PM 
 
 
 

Priority:
 
  Major 
 
 
 

Reporter:
 
 Travis Fields 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
[4:01 PM] Ethan J. Brown: it looks like Facter initializes COM in the wmi class (inside Leatherman) at https://github.com/puppetlabs/leatherman/blob/master/windows/src/wmi.cc#L34 
 
 
 
 
[4:01 PM] Ethan J. Brown: CoInitializeEx(0, COINIT_MULTITHREADED) 
 
 
 
 
		Ruby initializes COM at https://github.com/ruby/ruby/blob/c19d37375074987b36413af6bf83df7262ce227d/ext/win32ole/win32ole.c#L... 
 
 
 
 
[4:02 PM] Ethan J. Brown: hr = OleInitialize(NULL); 
 

Jira (FACT-1082) COM initialization prior to ruby COM initialization

2015-06-30 Thread Travis Fields (JIRA)
Title: Message Title
 
 
 
 
 
 
 
 
 
 
  
 
 Travis Fields updated an issue 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 Facter /  FACT-1082 
 
 
 
  COM initialization prior to ruby COM initialization  
 
 
 
 
 
 
 
 
 

Change By:
 
 Travis Fields 
 
 
 

Summary:
 
 com COM  initialization prior to ruby  com  COM  initialization 
 
 
 
 
 
 
 
 
 
 
 
 

 
 Add Comment 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 

 This message was sent by Atlassian JIRA (v6.3.15#6346-sha1:dbc023d) 
 
 
 
 
  
 
 
 
 
 
 
 
 
   





-- 
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 puppet-bugs+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-bugs@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/d/optout.