Add InfoLogger support and move logs before mount completion to InfoLogger#190
Open
thrivikram-karur-g wants to merge 2 commits intojacobsa:masterfrom
Open
Add InfoLogger support and move logs before mount completion to InfoLogger#190thrivikram-karur-g wants to merge 2 commits intojacobsa:masterfrom
thrivikram-karur-g wants to merge 2 commits intojacobsa:masterfrom
Conversation
…ogger if present and fallback if absent
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add InfoLogger support to the mount config of jacobsa fuse and also migrate all the logs from debugLogger before fuse mount completes to InfoLogger, in absence of an InfoLogger supplied the logs are logged falling back to debugLogger if present in the mountConfig. The motivation for this is that mounting the fuse file system is an important process and logs before mount completion are of importance and would be good to have them logged at lowest severity level like info.
b/491754571
Tested it using GCSFuse which depends on jacobsa/fuse supplying the InfoLogger and without and worked as expected.
with only debugLogger.
{"timestamp":{"seconds":1773219272,"nanos":223607924},"severity":"INFO","message":"Creating Storage handle...","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":223645826},"severity":"INFO","message":"UserAgent = gcsfuse/unknown (Go version go1.25.0) (GPN:gcsfuse) (Cfg:0:0:0:1:0:0) (mount-id:ffec3c0c)\n","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":223687578},"severity":"INFO","message":"Calling cred.UniverseDomain request for "credentials" with deadline=30s","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":224063234},"severity":"INFO","message":"Success in fetching cred.UniverseDomain","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":225393067},"severity":"INFO","message":"Creating a mount at "/home/thrivikramks_google_com/tmp/mnt"\n","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":225495594},"severity":"INFO","message":"Creating a new server...\n","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":225529403},"severity":"INFO","message":"MRD cache (LRU-based) enabled with maxSize=1000 (pools closed-file MRDs)","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":225540013},"severity":"INFO","message":"Set up root directory for bucket thrivikramks_fio_test_us_west4","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":225547758},"severity":"INFO","message":"GetStorageLayout <- (thrivikramks_fio_test_us_west4)","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":225593436},"severity":"INFO","message":"Calling GetStorageLayout request for "projects/_/buckets/thrivikramks_fio_test_us_west4/storageLayout" with deadline=30s","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":437943331},"severity":"INFO","message":"GetStorageLayout -> (thrivikramks_fio_test_us_west4) 212 msec","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":438032621},"severity":"INFO","message":"Calling cred.UniverseDomain request for "credentials" with deadline=30s","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":438598691},"severity":"INFO","message":"Success in fetching cred.UniverseDomain","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":439584104},"severity":"INFO","message":"Mounting file system "thrivikramks_fio_test_us_west4"...","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":439640378},"severity":"TRACE","message":"fuse_debug: Beginning the mounting kickoff process","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":439652217},"severity":"TRACE","message":"fuse_debug: Parsing fuse file descriptor","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":439658208},"severity":"TRACE","message":"fuse_debug: Preparing for direct mounting","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":439688138},"severity":"TRACE","message":"fuse_debug: Successfully opened the /dev/fuse in blocking mode","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":439703071},"severity":"TRACE","message":"fuse_debug: Starting the unix mounting","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":439716109},"severity":"TRACE","message":"fuse_debug: Directmount failed. Trying fallback.","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":439754693},"severity":"TRACE","message":"fuse_debug: Creating a socket pair","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":439780024},"severity":"TRACE","message":"fuse_debug: Creating files to wrap the sockets","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":439788916},"severity":"TRACE","message":"fuse_debug: Starting fusermount/os mount","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":448589851},"severity":"TRACE","message":"fuse_debug: Wrapping socket pair in a connection","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":448652377},"severity":"TRACE","message":"fuse_debug: Checking that we have a unix domain socket","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":448666998},"severity":"TRACE","message":"fuse_debug: Read a message from socket","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":448679934},"severity":"TRACE","message":"fuse_debug: Successfully read the socket message.","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":448688954},"severity":"TRACE","message":"fuse_debug: Converting FD into os.File","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":448712984},"severity":"TRACE","message":"fuse_debug: Completed the mounting kickoff process","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":448730761},"severity":"TRACE","message":"fuse_debug: Creating a connection object","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":449609058},"severity":"TRACE","message":"fuse_debug: Op 0x00000002 connection.go:477] <- init","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":450168778},"severity":"TRACE","message":"fuse_debug: Op 0x00000002 connection.go:576] -> init ()","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":450193024},"severity":"TRACE","message":"fuse_debug: Successfully created the connection","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":450209262},"severity":"TRACE","message":"fuse_debug: Waiting for mounting process to complete","mount-id":"ffec3c0c"}
{"timestamp":{"seconds":1773219272,"nanos":450221863},"severity":"INFO","message":"File system has been successfully mounted.","mount-id":"ffec3c0c"}
with infoLogger supplied.
{"timestamp":{"seconds":1773219688,"nanos":413111743},"severity":"INFO","message":"Creating Storage handle...","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":413150562},"severity":"INFO","message":"UserAgent = gcsfuse/unknown (Go version go1.25.0) (GPN:gcsfuse) (Cfg:0:0:0:1:0:0) (mount-id:f3e857a7)\n","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":413190741},"severity":"INFO","message":"Calling cred.UniverseDomain request for "credentials" with deadline=30s","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":413491434},"severity":"INFO","message":"Success in fetching cred.UniverseDomain","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":413928503},"severity":"INFO","message":"Creating a mount at "/home/thrivikramks_google_com/tmp/mnt"\n","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":413958484},"severity":"INFO","message":"Creating a new server...\n","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":414830272},"severity":"INFO","message":"MRD cache (LRU-based) enabled with maxSize=1000 (pools closed-file MRDs)","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":414907933},"severity":"INFO","message":"Set up root directory for bucket thrivikramks_fio_test_us_west4","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":414927220},"severity":"INFO","message":"GetStorageLayout <- (thrivikramks_fio_test_us_west4)","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":414964628},"severity":"INFO","message":"Calling GetStorageLayout request for "projects/_/buckets/thrivikramks_fio_test_us_west4/storageLayout" with deadline=30s","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":574542455},"severity":"INFO","message":"GetStorageLayout -> (thrivikramks_fio_test_us_west4) 159 msec","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":574638556},"severity":"INFO","message":"Calling cred.UniverseDomain request for "credentials" with deadline=30s","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":575184145},"severity":"INFO","message":"Success in fetching cred.UniverseDomain","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":577335667},"severity":"INFO","message":"Mounting file system "thrivikramks_fio_test_us_west4"...","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":577457201},"severity":"INFO","message":"fuse_debug: Beginning the mounting kickoff process","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":577471380},"severity":"INFO","message":"fuse_debug: Parsing fuse file descriptor","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":577478376},"severity":"INFO","message":"fuse_debug: Preparing for direct mounting","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":577502273},"severity":"INFO","message":"fuse_debug: Successfully opened the /dev/fuse in blocking mode","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":577518681},"severity":"INFO","message":"fuse_debug: Starting the unix mounting","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":577530311},"severity":"INFO","message":"fuse_debug: Directmount failed. Trying fallback.","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":577566717},"severity":"INFO","message":"fuse_debug: Creating a socket pair","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":577589097},"severity":"INFO","message":"fuse_debug: Creating files to wrap the sockets","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":577598080},"severity":"INFO","message":"fuse_debug: Starting fusermount/os mount","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":585763224},"severity":"INFO","message":"fuse_debug: Wrapping socket pair in a connection","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":585830224},"severity":"INFO","message":"fuse_debug: Checking that we have a unix domain socket","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":585839712},"severity":"INFO","message":"fuse_debug: Read a message from socket","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":585854003},"severity":"INFO","message":"fuse_debug: Successfully read the socket message.","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":585862327},"severity":"INFO","message":"fuse_debug: Converting FD into os.File","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":585907955},"severity":"INFO","message":"fuse_debug: Completed the mounting kickoff process","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":585917589},"severity":"INFO","message":"fuse_debug: Creating a connection object","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":586579154},"severity":"TRACE","message":"fuse_debug: Op 0x00000002 connection.go:477] <- init","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":586606987},"severity":"TRACE","message":"fuse_debug: Op 0x00000002 connection.go:576] -> init ()","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":586622133},"severity":"INFO","message":"fuse_debug: Successfully created the connection","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":586644277},"severity":"INFO","message":"fuse_debug: Waiting for mounting process to complete","mount-id":"f3e857a7"}
{"timestamp":{"seconds":1773219688,"nanos":586657629},"severity":"INFO","message":"File system has been successfully mounted.","mount-id":"f3e857a7"}