Git Product home page Git Product logo

omi's Introduction

Open Management Infrastructure Build Status

Open Management Infrastructure (OMI) is an open source project to further the development of a production quality implementation of the DMTF CIM/WBEM standards. The OMI CIMOM is also designed to be portable and highly modular. In order to attain its small footprint, it is coded in C, which also makes it a much more viable CIM Object Manager for embedded systems and other infrastructure components that have memory constraints for their management processor. OMI is also designed to be inherently portable. It builds and runs today on most UNIX® systems and Linux. In addition to OMI's small footprint, it also demonstrates very high performance.

Additional Resources

Get OMI

Using Github

RPM and DEB packages are provided for the installation of OMI on most enterprise Linux distributions. To install OMI, download the correct package for your Linux computer. Choose from:

  • 64-bit (x64) architecture
  • OpenSSL version 1.0.x, 1.1.x or 3.0.x (to determine your OpenSSL version, run: openssl version)
  • RPM or Debian package format

You can download and install OMI from the Releases page. While version numbers change from release to release, the following downloads illustrates the package types for OMI:

Platform Release Architecture SSL Filename
Linux   Debian x64         3.0.0 omi-MAJOR.MINOR.PATCH-BUILD.ssl_300.ulinux.x64.deb
Linux   Debian x64         1.1.0 omi-MAJOR.MINOR.PATCH-BUILD.ssl_110.ulinux.x64.deb
Linux   Debian x64         1.0.0 omi-MAJOR.MINOR.PATCH-BUILD.ssl_100.ulinux.x64.deb
Linux   RPM     x64         3.0.0 omi-MAJOR.MINOR.PATCH-BUILD.ssl_300.ulinux.x64.rpm
Linux   RPM     x64         1.1.0 omi-MAJOR.MINOR.PATCH-BUILD.ssl_110.ulinux.x64.rpm
Linux   RPM     x64         1.0.0 omi-MAJOR.MINOR.PATCH-BUILD.ssl_100.ulinux.x64.rpm

Note: MAJOR, MINOR, PATCH, and BUILD refer to the version number information for the specific version of OMI that you wish to install.

Using Package Managers

Alternatively, you can now also download from Microsoft Repo. Instructions on setting this up can be found here. Follow the instructions for your platform. You can then use your platform's package tool to install OMI (i.e. sudo apt-get install omi or sudo yum install omi).

The latest version of all supported platform packages can also be found here, but where possible we recommend downloading from the Microsoft Repo.

Supported Linux Operating Systems

We support most modern Linux platforms (and some that aren't so modern). That said, our formal tested matrix of Linux platforms includes the following:

  • CentOS 6 and 7 (x86 and x64)
  • CentOS 8 x64 (omi>=1.6.5-0)
  • Debian 8 (x86 and x64) and Debian 9 x64
  • Debian 10 x64 and 11 x64 (omi>=1.6.8-0)
  • Oracle Linux 6, and 7 (x86 and x64)
  • Oracle Linux 8 x64 (omi>=1.6.8-0)
  • Red Hat Enterprise Linux Server 6 and 7 (x86 and x64)
    • Note: Red Hat 7.1 or later also runs on the PPC platform
  • Red Hat Enterprise Linux Server 8 x64 (omi>=1.6.4-0)
  • Red Hat Enterprise Linux Server 9 x64 (omi>=1.7.0-0)
  • SUSE Linux Enterprise Server 12 x64, 12 ppc and 15.
  • Ubuntu 14.04 LTS, 16.04 LTS and 18.04 LTS (x86 and x64)
  • Ubuntu 20.04 LTS x64 (omi>=1.6.8-0)
  • Ubuntu 22.04 LTS x64 (omi>=1.7.0-0)

Supported Unix Operating Systems

As well as the Linux platforms supported, OMI is also tested to work on the following platforms:

  • AIX 7.1 and 7.2
  • HPUX 11.31 (ia64 only)
  • Solaris 10 and 11 (Sparc and x86)

Sample Installation Instructions

  • For RPM based systems (RedHat, Oracle, CentOS, SuSE):
sudo rpm -Uvh ./omi-1.3.0-2.ssl_100.ulinux.x64.rpm
  • For DPKG based systems (Debian, Ubuntu, etc.):
sudo dpkg -i ./omi-1.3.0-2.ssl_100.ulinux.x64.deb

Note: 1.3.0-2 is just an example, you should use the latest release version of OMI.

Building and Developing OMI

To download the source code to OMI for build purposes or to further develop OMI, please see repository Build-omi.

Setting Up Credentials

  • Setup of credentials for NTLM authentication is covered in setup-ntlm-omi (omi version >= v1.2.0-35)
  • Setup of credentials for Kerberos authentication is covered in setup-kerberos-omi (omi version >= v1.4.0-6)

Running

Installing OMI configures a daemon named "omid" which can be controlled with standard service controllers: service or systemctl. Additionally, a service control script can be found at: /opt/omi/bin/service_control

Restarting OMI: sudo /opt/omi/bin/service_control restart

Testing OMI

To test that OMI is functional locally, the omicli command be used:

sudo /opt/omi/bin/omicli ei root/omi OMI_Identify

This command enumerates all instances of the OMI_Identify class in the root/omi namespace.

Configuring OMI Server

OMI's server configuration is set in the file: /etc/opt/omi/conf/omiserver.conf. Important configuration properties include:

Property Purpose
httpsport The HTTPs port(s) to listen on. The default is 5986. Multiple ports can be defined as a comma-separated list
httpport The HTTP port to listen on. It is recommended that HTTP remain disabled (httpport=0) to prevent unencrypted communication
loglevel The logging option for MI server. Valid options are: ERROR, WARNING, INFO, DEBUG, VERBOSE (debug build), default value is: WARNING
agentDebugging When true, each provider runs in its own omiagent process; when false, all providers run in same omiagent process, default value is: false. (omi version >= v1.4.3-1)
AuthorizedGroups Setting for authorized user groups, for example: AuthorizedGroups=SCX\scx local admins, SCX\domain users, omi_allowed_group; its format is separated by commas, please check Allow Deny Handling for more detail. (omi version >= v1.4.3-1)
UnauthorizedGroups Setting for unauthorized user groups, for example: UnauthorizedGroups=SCX\denied domain users, omi_denied_group; its format is separated by commas, please check Allow Deny Handling for more detail. (omi version >= v1.4.3-1)
pemfile The certificate to use for TLS/SSL communication
keyfile The private key that corresponds to the TLS/SSL certificate
NoSSLv2 When true, the SSLv2 protocol is disabled
NoSSLv3 When true, the SSLv3 protocol is disabled. If NoSSLv2 and NoSSLv3 are both set to true, only TLS encryption will be negotiated
NoTLSv1_0 When true, the TLSv1.0 protocol is disabled
NoTLSv1_1 When true, and if available on the platform, the TLSv1.1 protocol is disabled
NoTLSv1_2 When true, and if available on the platform, the TLSv1.2 protocol is disabled
sslciphersuite The prioritized list of allowed SSL/TLS ciphers. For example, set ## The prioritized list of allowed SSL/TLS sslciphersuite=ALL:!SSLv2:!SSLv3:!TLSv1:!TLSv0:!CBC:!RC4-MD5:!RC4-SHA:!SEED-SHA in /etc/opt/omi/conf/omiserver.conf to disable all SSLv2,SSLv3,TLSv1,TLSv0 ciphers and other weak ciphers: ##CBC,RC4-MD5,RC4-SHA,SEED-SHA; then run sudo /opt/omi/bin/service_control restart to take effect, for more information, check man ciphers or search internet with openssl man ciphers

Configuring OMI Client

Similar to configuring the server, the client configuration file is located at /etc/opt/omi/conf/omicli.conf.

Log Rotation Configuration

The log rotate configuration for omi can be found at: /etc/logrotate.d/omi (omi version >= 1.6.0)

The default settings are

# omi logs rotate configuration settings
/var/opt/omi/log/*.log /var/opt/omi/log/*.trc {
    # keep 5 worth of backlogs
    rotate 5

    # If the log file is missing, go on to the next one
    # without issuing an error message.
    missingok

    # Do not rotate the log if it is empty,
    # this overrides the ifempty option.
    notifempty

    # Old versions of log files are compressed with gzip by default.
    compress

    # Log files are rotated only if they grow bigger then 100M.
    size 100M

    # Truncate the original log file in place after creating a copy,
    # instead of moving the old log file and optionally creating a new one.
    copytruncate
}

Note:

  1. To make log rotate every 15 minutes, we install a cron job at:/etc/cron.d/omilogrotate (omi version >= 1.6.0) The default setting is */15 * * * * root /usr/sbin/logrotate /etc/logrotate.d/omi >/dev/null 2>&1.
  2. If selinux is enabled on Linux machine, omi will install a selinux module called 'omi-logrotate' to make omi log rotate work fine on Linux platforms and Red Hat 7.1 PPC.
  3. Supported platforms for selinux log rotate: Supported Linux Operating Systems
  4. If cron or crond doesn't install on the machine, omi will not install omi log rotate cron job for omi logs to be rotated.
  5. If you don't want omi cron to rotate omi logs, you can just remove it: sudo rm -f /etc/cron.d/omilogrotate.
  6. If you want omi cron to rotate omi logs, but cron or crond doesn't start, then you can start it:sudo service cron start, sudo service crond start or sudo systemctl enable cron;sudo systemctl start cron.
  7. If you want omi cron to rotate omi logs, but cron or crond doesn't install, then you can install it:sudo apt-get install -y cron, sudo yum install -y crond, sudo yum install -y cronie or sudo zypper in cron -y.

Remoting

Connecting from Linux to Linux

/opt/omi/bin/omicli ei root/omi OMI_Identify --auth Basic --hostname yourlinuxhostname -u root -p rootpwd --port 5985

Connecting from Linux to Windows

/opt/omi/bin/omicli ei root/cimv2 Win32_Environment --auth Basic --hostname yourwinmachine -u administrator -p adminpassword --port 5985

Connecting from Windows to Linux

winrm enumerate http://schemas.microsoft.com/wbem/wscim/1/cim-schema/2/OMI_Identify?__cimnamespace=root/omi -r:http://yourlinuxhostname:5985 -auth:Basic -u:root -p:"rootpassword" -skipcncheck -skipcacheck -encoding:utf-8 -unencrypted

Note: If your root password contains escaped character like 'rootpa^ssword', you need to use double quotes like -p:"rootpa^ssword" for winrm on Windows. These escaped characters need to use double quotes after '-p:' :

%^&<>|'`,;=()!"\[].*?

OMI Providers

OMI Provider examples:

Provider Name Official Site
PowerShell Desired State Configuration - for Linux DSC
System Center Cross Platform Provider for Operations Manager SCXcore
PowerShell Remoting Protocol PSRP
Docker Monitoring Agent for OMI Server Docker Provider
MySQL Monitoring Agent for OMI Server MySQL Provider
Apache Monitoring Agent for OMI Server Apache Provider
Python Script Provider for OMI Server Python Provider

Microsoft Products that use OMI

The following table lists the Microsoft products and Azure services that use OMI to orchestrate configuration management and log collection on Linux VMs:

Product Name Official Site
Azure Automation Desired State Configuration Azure Automation Desired State Configuration, DSC Extension
System Center Operations Manager (SCOM) System Center Operations Manager (SCOM) Management Pack for UNIX and Linux Operating Systems
Log Analytics Agent Log Analytics Agent
Azure Security Center Azure Security Center
Container Monitoring Solution Container Monitoring Solution
Azure Sentinel Azure Sentinel
Azure Stack Hub Azure Stack Hub
Azure HDInsight Azure HDInsight
Azure Automation Azure Automation
Azure Automation Update Management Azure Automation Update Management
Azure Diagnostics (LAD) Azure Diagnostics (LAD)

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

omi's People

Contributors

aaptel avatar andyleejordan avatar ankurgupta2212 avatar bingyuliu avatar captainfreak avatar dantramsft avatar deepakjain111 avatar dishantcr7 avatar edneville avatar iristyle avatar jeffaco avatar jodie111 avatar jumpingyang001 avatar kant avatar krisbash avatar lilyfang avatar ndrix avatar niroyb avatar palladia avatar paulcallen avatar rahsing avatar s-sujith-kumar avatar sarojcare avatar shirelygu avatar singh-jagmohan avatar snchennapragada avatar vimish avatar yakman2020 avatar yash-khatri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

omi's Issues

Need to Do Proper channel binding for Kerberos

Need to do proper channel binding for kerberos authorisation. Currently we are assuming spnego resulting in ntlm, and channel binding is null, but in kerberos we need to bind to the channel

The posix function readdir_r is being deprecated

On Ubuntu 16.10, it became clear that readdir_r is being deprecated. See the manpage for readdir_r (or see www manpage for further details.

Basically, while readdir_r was supposed to be thread-safe (and is), it has a host of problems with the interface. Future plans are to make readdir thread-safe (possibly through external synchronization), and suggest that people use that instead.

Note that use of readdir_r, by default, triggers a compiler warning on Ubuntu 16.10.

Note that there are actually TWO readdir_r functions:

  1. readdir_r (section 3 of manpage), that has the problems specified above, and
  2. readdir_r (section 2 of manpage), that isn't intended to be called directly, and is only reachable via the _syscall3 interface - and there is no glibc convenience function for this). Note that readdir_r (2) has been superseded by getdents (2), which allows getting multiple directory entries in one call.

Because of our universal images, we'll likely need to define our own version of readdir that we guarantee to be thread safe that basically re-implements readdir_r (3) using underlying readdir_r (2) or getdents (2) interfaces. We will need to test such an interface via a universal binary and verify that it runs on all of the Linux platforms that we care about, even when built on an old system.

OMI is only read/write for OMIDevs group

Hi folks,

I needed to change how OMI is accessed due to additional team members; I needed to change the granularity of access.

We have an additional team now:

  1. @MSFTOSSMgmt/omsdevs : Controls access to all repositories except OMI
  2. @MSFTOSSMgmt/omidevs : Controls access to the OMI repository

If you are doing active development in OMI, then you need to be in the OMIDevs team. If you only need read access to to OMI project, then just being in OMSDevs should be sufficient (which everyone getting this is except for JohnA and Andy).

Bottom line: This shouldn't affect anyone except the few of us directly contributing to the OMI project.

If you have any problems, let me know, and I'll take care of it.

Note: I would anticipate that, as time progresses, more granular teams will be set up. In all cases, the OMSDevs team will retain access to the repositories that they need, although some may become read-only.

/Jeff

Create a PowerShell cmdlet for OMI from CDXML on Linux

Good evening. I've been trying to create a PowerShell cmdlet for OMI from CDXML on Linux without success. I've been through Richard Siddaway's book and blog which describe how to do this on Windows, but when I go to run my shiny new cmdlet on Linux, I consistently get back the error below. Any chance I can sweet talk you into producing an example of a working cdxml cmdlet for PowerShell on Linux that I can use to Get-XYZ_Frog ?

I feel like there is a lot of potential here. I just need help getting started. Thanks for your consideration of the matter.

"Exception calling 'ProcessRecord' with '1' argument(s): 'The method or operation is not implemented.'"
At line: 108 char:5

  • $__cmdletization_objectModeWrapper.ProcessRecord($__cmdletizatio ..."
  • CategoryInfo: NotSpecified: (:) [], ParentContainsErrorRecordException
  • FullyQualifiedError ID : NotImplementedException

Newest version, omsagent-1.2.0-148, of the oms agent seem to crash continuously and fills upp the disk with core dumps under the following path, /var/opt/omi/run/.

Installed the newest version, omsagent-1.2.0-148, of the oms agent seem to crash continuously and fills upp the disk with core dumps under the following path, /var/opt/omi/run/.
The issue seems to be with the omi provided in that package and verified that it crashes on ubuntu 16.04.1 and centos 7.2. Previous versions of the agent worked without issues.

Running on the vm's is
Docker 1.12.3
Omsagent 1.2.0-148 (omi 1.1.0)

We get the following errors on ubuntu/centos machines

[root@myhost run]# journalctl -f | grep omiag
Nov 23 14:40:22 myhost kernel: omiagent[57281]: segfault at 10 ip 00007f12d7b92869 sp 00007fffdab230e0 error 4 in libcontainer.so[7f12d7b33000+77000]
Nov 23 14:40:59 myhost kernel: omiagent[57322]: segfault at 10 ip 00007f03bc34f869 sp 00007ffd14f432a0 error 4 in libcontainer.so[7f03bc2f0000+77000]
Nov 23 14:41:36 myhost kernel: omiagent[57399]: segfault at 10 ip 00007fe3fedf4869 sp 00007ffc5f19ede0 error 4 in libcontainer.so[7fe3fed95000+77000]
Nov 23 14:42:13 myhost kernel: omiagent[57427]: segfault at 10 ip 00007f3d70af4869 sp 00007ffcf7b88350 error 4 in libcontainer.so[7f3d70a95000+77000]

A collegue ran a gdb trace and i've attached it to the issue
gdb.txt

Apparent thread race condition in test libtest_cli.so:TestOMICLI14_Sync

On solaris, a test case failed at Assertion failed: !info->otherAckPending, file strand.c, line 547.

The failure is where a request is submitted before the ack is received for another request.

gzipped tar file attached with the core and binaries.

code for reference:

(dbx) list 530,560
530 DEBUG_ASSERT( NULL != info->userFT->PostControl );
531 DEBUG_ASSERT( NULL != info->stored.controlMsg );
532
533 info->userFT->PostControl( self, info->stored.controlMsg );
534 Message_Release( info->stored.controlMsg ); // now we can remove the reference added on StrandInteraction*
535
536 return MI_FALSE;
537 }
538
539 //------------------------------------------------------------------------------------------------------------
540 MI_INLINE
541 MI_Boolean _StrandMethodImp_Post( In Strand* self, In InteractionInfo* info)
542 {
543 DEBUG_ASSERT( info->opened );
544 DEBUG_ASSERT( !info->otherClosedThis );
545 DEBUG_ASSERT( NULL != info->userFT->Post );
546 DEBUG_ASSERT( NULL != info->stored.msg );
547 DEBUG_ASSERT( !info->otherAckPending );
548
549 info->otherAckPending = MI_TRUE;
550 info->userFT->Post( self, info->stored.msg );
551 Message_Release( info->stored.msg ); // now we can remove the reference added on StrandInteraction*
552
553 return MI_FALSE;
554 }
555
556 //------------------------------------------------------------------------------------------------------------
557 MI_INLINE
558 MI_Boolean _StrandMethodImp_Ack( In Strand* self, In InteractionInfo* info)
559 {
560 // note that info->otherClosedThis may be true here

The thread stacks are 👍

(dbx) where
current thread: t@80
[1] _lwp_kill(0x0, 0x15f84aa0, 0x0, 0x6, 0x0, 0x0), at 0xf3349fa0
[2] raise(0x6, 0xffffffef, 0xffffffec, 0xf9bfaf90, 0x5, 0x6), at 0xf32f3338
[3] abort(0xf9bfb090, 0xf33ee1f0, 0x6, 0x1, 0xf33efa80, 0x0), at 0xf32cac6c
[4] _assert(0xfe386ee4, 0xfe3924a8, 0x223, 0x218aa8, 0xf9bfb090, 0xf33ee1f0), at 0xf32caf28
=>[5] _StrandMethodImp_Post(self = 0x10f744, info = 0x10f76c), line 547 in "strand.c"
[6] _StrandMethod_Post(self = 0x10f744), line 692 in "strand.c"
[7] _Strand_ExecuteLoop(self = 0x10f744, state = 577), line 2874 in "strand.c"
[8] _Strand_ScheduleImp(self = 0x10f744, methodBit = 64U, allowMultiSchedule = '\0', fromStrand = (nil), entryOperationBit = 0), line 3036 in "strand.c"
[9] _StrandInteraction_Post(interaction = 0x10f76c, msg = 0x218aa8), line 363 in "strand.c"
[10] _Strand_PostAndLeaveStrand_Imp(strand = 0x221a88, info = 0x221ab0, msg = 0x218aa8), line 555 in "Strand.h"
[11] Strand_PostAndLeaveStrand(strand = 0x221a88, msg = 0x218aa8), line 1061 in "Strand.h"
[12] ProtocolSocket_Aux_PostMsg(self = 0x221a88), line 353 in "protocol.c"
[13] _StrandMethod_Aux0(self = 0x221a88), line 747 in "strand.c"
[14] _Strand_ExecuteLoop(self = 0x221a88, state = 4097), line 2874 in "strand.c"
[15] _Strand_ScheduleImp(self = 0x221a88, methodBit = 4096U, allowMultiSchedule = '\0', fromStrand = (nil), entryOperationBit = 0), line 3036 in "strand.c"
[16] Strand_ScheduleAux(self = 0x221a88, auxMethodNumber = 0), line 1733 in "Strand.h"
[17] _ProcessReceivedMessage(handler = 0x221a68), line 1015 in "protocol.c"
[18] _ReadAllPages(handler = 0x221a68), line 1194 in "protocol.c"
[19] _RequestCallbackRead(handler = 0x221a68), line 1216 in "protocol.c"
[20] _RequestCallback(sel = 0x221f50, handlerIn = 0x221a68, mask = 2U, currentTimeUsec = 7783670730051ULL), line 1240 in "protocol.c"
[21] Selector_Run(self = 0x221f50, timeoutUsec = 0, noReadsMo(dbx) where t@79
current thread: t@79
=>[1] __lwp_park(0x4, 0x0, 0x0, 0x1, 0x0, 0xfed90080), at 0xf3345478
[2] cond_sleep_queue(0x2f918, 0x2f928, 0x0, 0x0, 0x0, 0x0), at 0xf333f020
[3] cond_wait_queue(0x2f918, 0x2f928, 0x0, 0x0, 0x0, 0x0), at 0xf333f288
[4] cond_wait(0x2f918, 0x2f928, 0x0, 0x0, 0xfd5d1240, 0x0), at 0xf333f8d0
[5] pthread_cond_wait(0x2f918, 0x2f928, 0x0, 0x0, 0x2f928, 0xfffc00), at 0xf333f90c
[6] CondLock_Wait(key = 1161952, destination = 0x11bb18, comparand = 0, spinCount = 4294967295U), line 1199 in "condlockposix.c"
[7] InteractionProtocolHandler_ThreadShutdown(_application = 0x11bae0), line 2435 in "InteractionProtocolHandler.c"
[8] _Wrapper(param = 0x115a58), line 221 in "thread.c"

(dbx) thread -info t@1
Thread t@1 (0xfeda2a40) at priority 0
state: asleep on _slots+0x5588 (0x32a18): thread condition variable
base function: 0x0: 0x00000000() stack: 0xffc00000[8388608]
flags: (none)
masked signals: (none)
Currently inactive in __lwp_park
(dbx) where t@1
current thread: t@1
=>[1] __lwp_park(0x4, 0x0, 0x0, 0x1, 0x0, 0xfed90000), at 0xf3345478
[2] cond_sleep_queue(0x32a18, 0x32a28, 0x0, 0x0, 0x0, 0x10f744), at 0xf333f020
[3] cond_wait_queue(0x32a18, 0x32a28, 0x0, 0x0, 0x0, 0x0), at 0xf333f288
[4] cond_wait(0x32a18, 0x32a28, 0x0, 0x0, 0xfeda2a40, 0x156f70), at 0xf333f8d0
[5] pthread_cond_wait(0x32a18, 0x32a28, 0x0, 0x0, 0x32a28, 0xf33ee1f0), at 0xf333f90c
[6] CondLock_Wait(key = 1111616, destination = 0x10f6e4, comparand = 0, spinCount = 4294967295U), line 1199 in "condlockposix.c"
[7] Operation_GetInstance_Result(operation = 0xffbfdaa8, instance = 0xffbfd9dc, moreResults = 0xffbfd9e3 "", result = 0xffbfd9e8, errorMessage = 0xffbfd9d4, completionDetails = 0xffbfd9d0), line 2910 in "Operation.c"
[8] MI_Operation_GetInstance(operation = 0xffbfdaa8, instance = 0xffbfd9dc, moreResults = 0xffbfd9e3 "", result = 0xffbfd9e8, errorMessage = 0xffbfd9d4, completionDetails = 0xffbfd9d0), line 7723 in "MI.h"
[9] ConsumeInstanceResults(miOperation = 0xffbfdaa8), line 651 in "cli_c.c"
[10] Associators(miSession = 0xffbfdb78, argc = 5, argv = 0x1153bc), line 1514 in "cli_c.c"
[11] climain(argc = 8, argv = 0x1153b0), line 2768 in "cli_c.c"
[12] Exec(cmd = 0xf98fa884 "omicli -synchronous a test/cpp { X_numberWorld Name theWorld }", out = CLASS, err = CLASS), line 370 in "test_cli.cpp"
[13] TestOMICLI14_Sync(_NitsContext = 0x115638), line 768 in "test_cli.cpp"
[14] NitsBody_NewInterfaceTest(test = CLASS), line 1159 in "Switch.cpp"
[15] TestSystem::Test::RunBody(this = 0xf9a75e10), line 1045 in "Switch.cpp"
[16] TestSystem::Test::ContinueProcessingAfterSetup(this = 0xf9a75e10), line 958 in "Switch.cpp"
[17] NitsRunContinuation(test = CLASS), line 1412 in "Switch.cpp"
[18] TestCliSetup(_NitsContext = 0x115678), line 385 in "test_cli.cpp"
[19] NitsBody_NewInterfaceTest(test = CLASS), line 1159 in "Switch.cpp"
[20] NitsSetup_NewInterfaceTest(test = CLASS), line 1235 in "Switch.cpp"
[21] TestSystem::Switch::RunSetup(this = 0xf9a75e10), line 283 in "Switch.cpp"
[22] TestSystem::Test::RunVariation(this = 0xf9a75e10), line 1007 in "Switch.cpp"
[23] TestSystem::Test::Execute(this = 0xf9a75e10, choices = (nil)), line 558 in "Switch.cpp"
[24] TestSystem::Run::ExecuteTest(this = 0xff2da314, test = 0xf9a75e10, choices = (nil), executeIfTypeIs = BodyFixture), line 988 in "Run.cpp"
[25] TestSystem::Module::RunTests(this = 0x1170f8, start = 0), line 286 in "Run.cpp"
[26] TestSystem::Module::Execute(this = 0x1170f8), line 352 in "Run.cpp"
[27] TestSystem::Run::Execute(this = 0xff2da314), line 750 in "Run.cpp"
[28] NitsExecuteRun(), line 38 in "Run.cpp"
[29] main(argc = 2, argv = 0xffbff8a4), line 151 in "nits.cpp"
(dbx) where t@2
current thread: t@2
=>[1] __nanosleep(0x4, 0x0, 0x0, 0x1, 0x0, 0x0), at 0xf334936c
[2] nanosleep(0xfc35bd70, 0x0, 0x0, 0x0, 0xfd5d0240, 0x0), at 0xf3335874
[3] Sleep_Milliseconds(milliseconds = 1U), line 31 in "sleep.h"
[4] __TimedWaitHelper(sem = 0xfece0000, milliseconds = 200), line 275 in "sem.c"
[5] NamedSem_TimedWait(self = 0xff2d9ec4, milliseconds = 200), line 195 in "sem.h"
[6] TestSystem::Run::PipeThread(this = 0xff2da314), line 643 in "Run.cpp"
[7] _PipeThread(param = (nil)), line 632 in "Run.cpp"
[8] _Wrapper(param = 0x12a600), line 221 in "thread.c"
(dbx) where t@3
dbx: no thread with id 3
(dbx) where t@79
current thread: t@79
=>[1] __lwp_park(0x4, 0x0, 0x0, 0x1, 0x0, 0xfed90080), at 0xf3345478
[2] cond_sleep_queue(0x2f918, 0x2f928, 0x0, 0x0, 0x0, 0x0), at 0xf333f020
[3] cond_wait_queue(0x2f918, 0x2f928, 0x0, 0x0, 0x0, 0x0), at 0xf333f288
[4] cond_wait(0x2f918, 0x2f928, 0x0, 0x0, 0xfd5d1240, 0x0), at 0xf333f8d0
[5] pthread_cond_wait(0x2f918, 0x2f928, 0x0, 0x0, 0x2f928, 0xfffc00), at 0xf333f90c
[6] CondLock_Wait(key = 1161952, destination = 0x11bb18, comparand = 0, spinCount = 4294967295U), line 1199 in "condlockposix.c"
[7] InteractionProtocolHandler_ThreadShutdown(_application = 0x11bae0), line 2435 in "InteractionProtocolHandler.c"
[8] _Wrapper(param = 0x115a58), line 221 in "thread.c"

test lex test13 deactivated because of strtoull

tests/codec/mof/blue/consts.c

test case "test13" must be deactivated on solaris, hpux, aix due to limitations of their strtoull
which cannot parse the number "0x7fffffffffffffff" . They all share the same bug that they do not overrange, but do not perform the conversion. Macos and 64 bit Linux are able to handle it only because they use a 128 bit integer type to accumulate in the function.

On Suse10, the test libtest_base.so:TimerTest_BasicTimeout_Success occassionally fails

error output:

test_timer.cpp(169):
Assert: timerTestStrand.timeoutTime-startTimeUsec >= FIFTY_MILLISECONDS_AS_USEC
(Timeout took shorter than expected)
[Failed] libtest_base.so:TimerTest_BasicTimeout_Success 0.054719

Investigations show that the actual timeout was sometimes 49.* msecs.

Although various platforms provide high-precision timers, there isn't an easy way to implement this on all platforms. See http://stackoverflow.com/questions/361363/how-to-measure-time-in-milliseconds-using-ansi-c.

Our implementation is located in pal/sleep.c. On most platforms, _POSIX_MONOTONIC_CLOCK does not appear to be > 0, so just basic gettimeofday() is used. It's not trivial to just enable clock_gettime, as many older platforms also require linking with -lrt library.

Can't run install builder from OMI (?)

I need to make packages for OMI per our internal project, and while the install builder setup is available within OMI, as far as I and @jeffaco can tell, the OMI packages can't be built from OMI itself.

@johnkord are we mistaken here, or do we need to get the installbuilder scripts made available in OMI (or a separate repo)?

Pbuild test user does not have permission to execute omiagent

On CentOS7, basic-auth unit-tests fail. Investigations show that this is because the server tries to spawn omiagent and fails. Omiagent is invoked using the test account credentials (omi_test), which does not have access to the omiagent executable because my /home/v-geflem directory is by default 700 on CentOS7. In most other systems, the default permission is 755 for home directories.

Temporarily change home directory to 711, and the tests run cleanly.

Fix authentication unit-tests

There are a number of issues to be fixed:

  1. Server isn't always given enough time to properly shut down, causing next tests to fail.
  2. If auth tests are skipped, it should show as failed (except on Travis).
  3. Enable tests to run using either "regress" or "make test".
  4. If server is running, shut it down before doing unit-tests.
  5. Require that an account with valid credential be created before running tests, and that environment variables OMI_USER and OMI_PASSWORD be set to the credential.
  6. "sudo -E" is not supported on some platforms.

omicli without -u parameter still works

./omicli gi --hostname localhost oop/requestor/test/cpp { MSFT_President Key 1 }

returns:

instance of MSFT_President
{
Key=1
First=George
Last=Washington
}

Debugger shows that it's using the credential of 'root'

Needs to be public

Tracking here so the issue doesn't get lost.

@agup006 Last I heard this was being discussed with legal. Has there been any movement?

While OMI is "open-source" the only release is through The Open Group, and so our real repository is private.

This causes a lot of pain with our other internal project which takes a dependency on OMI, as every user needs to get authenticated in both GitHub organizations.

On HP, CIM_Error Rtti tests fail consistently

on hp_v3_ia64, libtest_wsman.so:TestWSMAN_GetClass_CIM_Error_StandardRtti and libtest_wsman.so:TestWSMAN_GetClass_CIM_Error_StandardRtti_OOP tests fail consistently.

This is the actual response from server:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsen="http://schemas.xmlsoap.org/ws/2004/09/enumeration" xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsmb="http://schemas.dmtf.org/wbem/wsman/1/cimbinding.xsd" xmlns:wsman="http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd" xmlns:wxf="http://schemas.xmlsoap.org/ws/2004/09/transfer" xmlns:cim="http://schemas.dmtf.org/wbem/wscim/1/common" xmlns:msftwinrm="http://schemas.microsoft.com/wbem/wsman/1/wsman.xsd" xmlns:wsmid="http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd">
SOAP-ENV:Header
wsa:To
http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
</wsa:To>
wsa:Action
http://schemas.xmlsoap.org/ws/2004/09/transfer/GetResponse
</wsa:Action>
wsa:MessageIDuuid:2D9060DE-4533-0005-0000-000000010000</wsa:MessageID>
wsa:RelatesTouuid:DFCFFC30-89CA-4C3F-8E8C-4DA843C58615</wsa:RelatesTo>
</SOAP-ENV:Header>
SOAP-ENV:Body


2.22.1


CIM::Interop


true






true



<PROPERTY.ARRAY NAME="MessageArguments" TYPE="string" CLASSORIGIN="CIM_Error"/>



<PROPERTY.ARRAY NAME="RecommendedActions" TYPE="string" CLASSORIGIN="CIM_Error"/>


0





</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

MI_RESULT_TYPE_MOF_PARSER errors are not handled by OMI_ErrorFromErrorCode

When errors are encountered at parse time deserializing class or instance MOFs, the errors reported by the parser are lost. This is due to MI_RESULT_TYPE_MOF_PARSER not being handled by OMI_ErrorFromErrorCode.

this is seen with DSC/Linux when errors are encountered parsing a configuration or meta MOF that contains errors. Instead of receiving a specific error, a generalized file load error is reported.

See Dsc/Linux issue microsoft/PowerShell-DSC-for-Linux#83 for an example.

Need a clear list of dependencies

Downloaded a clean Ubuntu 16 server.
Dependencies for compiling should be listed including libraries (they are not)
C++
cmake (to start - seems obvious but it isn't)

Omiagent seems to leak memory with OmsAgent and Docker

I'm not sure yet what is going on here, but I'll report it anyway with what I know.

I see a steady growth in resident memory used by the omiagent process on Ubuntu 16.04.1 LTS VM:s in Azure running Docker 1.12.3 together with the latest OmsAgent, v1.2.0-148.

Attached is an image showing the result in OMS after a systemctl restart omid, freeing up about 300Mb of memory per node, then starting growing linearly again.

omid-restart

The growth is identical on all docker hosts, regardless of their running containers which are different (apart from one global service). The graph shows five swarm members with the same level of growth from different base levels. Note that the graph, though hard to see, also includes one management node not running the docker daemon (the flat dark green line), and it does not show this growth. The management VM is smaller (A1 vs A2), but otherwise runs the same software apart from the Docker daemon.

I cannot find anything in any logs seeming related.

$ uname -a
Linux kth-integral-2 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

$ sudo docker version
Client:
Version: 1.12.3
API version: 1.24
Go version: go1.6.3
Git commit: 6b644ec
Built: Wed Oct 26 22:01:48 2016
OS/Arch: linux/amd64

Server:
Version: 1.12.3
API version: 1.24
Go version: go1.6.3
Git commit: 6b644ec
Built: Wed Oct 26 22:01:48 2016
OS/Arch: linux/amd64

Header files (mi.h, etc) are copied during configure, leading to potential errors

The configure script copies some base header files and changes them based on the build configuration.

This is often problematic in that, after doing a rebase operation, builds may start to fail until configure is rerun. This is not something that developers expect, wasting a potentially large amount of time.

Can this be resolved such that builds are more stable without requiring configure to modify base files?

Minor typo in README.md

The first row of the table in the "Configuring OMI Server" section has "comma-seperated" instead of "comma-separated"

omicli -xml crashes when response includes certain characters

omicli always crashes on this request for me:

$ omicli -t -xml -u ... -p ... --hostname ... gi root/cimv2 '{' Win32_Service name spooler '}'

The crash happens here when accessing the "_encode" array outside of its bounds:

Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x000000000040fd3b in WriteBuffer_Char (clientBuffer=0x1df59f0 "<INSTANCE CLASSNAME="Win32_Service"><PROPERTY NAME="AcceptPause" TYPE="string">false<PROPERTY NAME="AcceptStop" TYPE="string">true<PROPERTY NAME="Ca"..., clientBufferLength=10000, clientBufferNeeded=0x7ffccb193ecc, charToWrite=-30 '\342', escapingDepth=1, result=0x7ffccb193e18) at xmlserializer.c:894
894 (_encode[(unsigned int)charToWrite].str == NULL))

Here's the interesting part of the received string - the problematic character being E2:

$ tail -1 omiclient-recv.trc | xxd
...
0000490: 7365 7276 6963 652c 2079 6f75 2077 6f6e service, you won
00004a0: e280 9974 2062 6520 6162 6c65 2074 6f20 ...t be able to
00004b0: 7072 696e 7420 6f72 2073 6565 2079 6f75 print or see you
00004c0: 7220 7072 696e 7465 7273 2e3c 2f70 3a44 r printers.</p:D
...

The fix is simple - just ensure array index is OK before accessing it.

Some test cases seem quite slow at 24 seconds

A number of regress test cases seem to be timing out after a 24 second wait.

A partial list would be :
libtest_protocol.so:TestTransferingEnumerateInstanceRequest 24.0015
libtest_protocol.so:TestTransferingResult 24.0016
libtest_protocol.so:TestTransferingGetInstanceReqt 24.0026
libtest_protocol.so:TestTransferingPostInstance 24.0021
libtest_protocol.so:TestTransferingInvoke 24.0017

client timeouts are propagating an mi_result for timeout that is not a valid result

we have an internal mi_result that should not be exposed directly to the client. instead we need to create a CIM_Error object with the correct category stating it is a timeout, and the actual mi_result will be an mi_result_failed.
NOTE: When this changes the powershell remoting client will need to be updated otherwise it will be completely broken with its Receive processing which relies on Timeout requests from the server.

Missing unit-tests

  • Client-side wsman timeout

  • Invalid machine

  • Bad credentials

  • Bad options

omicli segvs with "not supported" on auth failure

The reason is the failure to end the strand. If an enumerate was started an enuerate context is still active and the EnumeratePullRequest tries to inspect the not-existing headers.

The solution is to deactivate the enumerate context and post a bad result to the strand.

OMI history has been rewritten!

OMI history has been rewritten. This is super invasive.

The easiest way to resolve this is to simply reclone your repository. This is the safest way to make sure that you don't inadvertently push the "bad history" back to GitHub.

Let me know if you have any questions.

@Microsoft/omi-devs
@Microsoft/ostc-devs
@Microsoft/omsagent-devs

This issue will be deleted before we go public.

Try to get rid of sleeps in running authentication unit tests

When running authentication unit-tests, the server must be run as super-user. This creates some unique problems in starting up and shutting down the omiserver.

For authentication tests, omiserver must be started via the sudo command. Since sudo doesn't seem to work well with system(3) command, one must start up omiserver using fork/exec. And since the start up and shutting down of omiserver both require fork/exec, you now have an asynchronous situation where the next test may start before the previous one shuts down cleanly. And since both tests rely on the same pid file, you may have situations where the pid file of second test gets deleted by first test.

We've gotten around the problem so far by putting in more and more sleep. This is both unsafe and unreliable. A better way is needed.

Fix OpenSSL linking on MacOS

OMI (like many other programs) requires the Homebrew version of OpenSSL. We used to follow .NET Core's instructions and brew link --force the libraries into the system locations. This was, of course, a terrible idea and Homebrew/brew#597 prevents it from being done (for security reasons), which caused our CI build failures for OS X.

test pal multibyte test case fails on aix

test_pal.c,pp test case test multibytecharacterlength3 fails on aix. The utf8length of the function is returned as zero.

This case has been deactivated for aix. It is deactivated for windows already.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.