Skip to content

MongoDB 4.2.10 starts to emit warnings about slaveOk() being deprecated, which breaks the module #596

@dhs-rec

Description

@dhs-rec

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 6.18.0
  • Distribution: Debian Buster
  • Module version: 3.1.0

How to reproduce (e.g Puppet code you use)

Increase MongoDB version from 4.2.9 to 4.2.10.

What are you seeing

Puppet agent runs start failing with an error:

Info: Applying configuration version '1602075392'
Error: Could not prefetch mongodb_database provider 'mongodb': 765: unexpected token at 'WARNING: ) is deprecated and may be removed in the next major release. Please use secondaryOk( instead.

Unfortunately, Puppet cuts off some bits of the message, but I assume the real warning is this:

slaveOk() is deprecated and may be removed in the next major release. Please use secondaryOk() instead.

And indeed, if I change all occurrences of slaveOk() to secondaryOk() it starts working again.

What behaviour did you expect instead

A simple warning shouldn't break the module.

Output log

See above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions